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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
DBLONDEL1643728674
Contributor III
Contributor III

Built json to send to trestclient patch methode

hello Talend team

I have essue while i'am building a string to send to a trest client on tmap :

new String varstr = (""\"{

 \"AIRCRAFT_REGISTRATION\": \"N-NMO\",

 \"FLIGHT_DATE\": \"05MAI22\",

\"DEPARTURE_STATION\": \"CGL\",

\"AD_OUT\": 55555.555,

\"AD_OFF\": 555555.56,

\"ARRIVAL_STATION\": \"ORY\",

\"AA_ON\": \"55555.556\",

\"AA_IN\": \"555555.56\",

 \"FLIGHT_NUMBER\": \"HV34568\",

\"FLIGHT_CYCLE\": 2,

\"FLIGHT_LOG\": \"12345\",

\"FLIGHT_LEG\": \"2\"

0695b00000Riv8cAAB.png

But i have compilation issues :

0695b00000Riv8mAAB.png

I am trying to espcape special caractere but still have issue

thank you in advance

Labels (3)
2 Replies
Anonymous
Not applicable

Hi Team,

 

I hope you are doing good.

Please refer to the below tMap component documentation it has many scenarios and examples related to tMap.

Link: https://help.talend.com/r/en-US/8.0/tmap/tmap?tocId=xh4Ajmpb9XV6L2lTX0jX~Q

 

Thanks in advance.

Anonymous
Not applicable

Hi

The data type is String, but you create a string array here, Talend type does not support String[]. To build a Json string, why don't you use tWriteJsonField.

 

Regards

Shong