Can't read JSON properly
Application Type
Reactive

So i have a web service devoleped in talend ESB studio , this webservice return a json response in this format:

{

  "id": value,

  "method": "value",

  "parameters": [

    {

      "id": value,

      "name": "value",

    }

  ],

  "request": {

    "id": value,

    "description": "value",

    "body": [

      {

        "id_body": "",

        "description": "",

        "content": JSON object in a string format,

        "mediaType": ""

      }

    ]

  },......}

To have this output , i have configured talend to return a response in the string format. the problem is that when i use the json serilize to extract the filed of it for the key content of body , i can't  because the component can't recognise the string it reads it as it already JSON .

what can i do ?


Hello Eya,

if i understand Correct, you need to use JSONDeserialize Component.

Correct me if i understand it wrong.

Thanks

mvp_badge
MVP

Hi Eya,

If it's a REST service, why do you use a JSON Deserialize? You should use the native OutSystems Platform REST capabilities to convert the content that is sent to Structures, wherever possible.

If you are talking specifically about the "content" part, if that's actual JSON (rather than a string of escaped JSON), you'll need to add that to the structures you use in the REST consume. Alternatively, but this is not adviced if there's not a specific good need, you could use the On After Response to deserialize things.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.