Hi,
I've a job where a web service extract documents from a MongoDB and sends them as one JSON Document,
TMongoInput --> tXMLMap --> tRESTResponse
My problem is that the documents contains an array and tRESTResponse sends it as a JSON string....
Talend does not convert JSON into a Document object. Only XML is handled as a Document by Talend. There are JSON Objects available in Java, but for some reason Talend doesn't use these. Possibly due to REST standards? There shouldn't be a problem sending an array in a JSON string format though.
{msisdn": 320740071,"dep": "","profile_id": "","consumption": ""}I'm getting this result ! Consumption field is an array in the DB and the Web service is returning it like this !
That is an array in JSON. You need to look
here and make use of the "
Generate JSON Document" option on the Advanced Settings tab of your output component.
Thank you for your answer, well i'm trying to read from Db not inserting in it ... the problem is in tRESTResponse component it's not able to send Complex JSON structure (with nested array)... i think it's a bug !