cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

JSON input parameter for service

MA8731174
14-Alexandrite

JSON input parameter for service

Hello Community,

I am sending jsonData which is my input parameter of the service from my mashup and it goes like this in the picture below.

 

Jamal8548_1-1718016014522.png

I am unable to read it in the service. I know the methods JSON.parse and JSON.stringify but still i am not getting it. I am unable to read the data. why its converting the json in this format.

 

 

I dont why my json is getting converted with double serialization with extra back slashes.

 

 

 

  • Single Serialization: When you serialize a JSON object, it should be converted to a JSON string with necessary escape characters.
  • Double Serialization: If the JSON string is serialized again or if escape characters are added improperly, it results in a string with extra backslashes.
  •  

my json in mashup. its hardcoded i have written. 

Jamal8548_0-1718018450367.png

 

2 REPLIES 2

You can probably use an expression to pass in the JSON text and convert that to a JSOn object and the service with input type JSON can take it. What is teh source of the JSOn data from mashup ??

Bikash_Panda_0-1718623931315.png

 

 

MA8731174
14-Alexandrite
(To:Bikash_Panda)

Thank you @Bikash_Panda  Actually my company updated the version of the thingworx to 9.3 and here i dont need to do anything. The service is sending right JSON data through parameter. We had before an older version of thingworx and the source of JSON is nothing. Its written hardcoded in the parameter field which i am sending.

Announcements


Top Tags