Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tRESTResponse Sends a JSON string instead of JSON

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....
  
 
Labels (5)
6 Replies
Anonymous
Not applicable
Author

Screenshots
Anonymous
Not applicable
Author

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.
Anonymous
Not applicable
Author


{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 !
0683p000009MAq0.png
Anonymous
Not applicable
Author

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.
Anonymous
Not applicable
Author

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 !  
Anonymous
Not applicable
Author

The tRESTResponse component needs to be configured to return a String and not a Document for JSON.