Unexpected token while deserializing JSON

While performing web block, I can serialize the data, look like in the below-mentioned image. But deserialization throws this type of error...? What's about??

Screenshot (31).png

mvp_badge
MVP

Hello Faisal,

Your JSON String is not in the correct JSON format.

You can check this article with some examples about  how to use it https://itnext.io/serializing-deserializing-json-in-the-outsystems-platform-ae08f2f6b5b4

Regards,

Luís 


Faisal,

you should check the strcture of your UserList variable. that is the JSON that is expected.

At this moment your JSON_IN is not a JSON, because it should at least look like: "{"fieldname" : "value"}".


if you have problems creating the JSON string, you can also do a reverse: 

Create a screen where you serialize a Userlist and put that in a variable that you can show in your screen.

@Faisal Sahapdeen , if you’ve response of the expected result , you better create your structure using create structure using json.

So it’ll probably meet with your output.


Thanks,

Sandeep.

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