Hi Team,
I am facing an error while deserializing JSON i.e. "Failed to deserialize JSON to Struct_xyz:After parsing a value an unexpected character was encountered: ".
Does anyone have a clue on where to look for?
Thanks in advance.
Hello @RUPAL AGRAWAL
You would need to make sure the structure can hold the value of compatible data type.
https://success.outsystems.com/documentation/11/reference/outsystems_language/logic/implementing_logic/logic_tools/json_deserialize/
Hi @RUPAL AGRAWAL ,
Can you paste your json and structure format. May be in json is not correct format thats why getting this issue.
Or may be your structure is not the same as json.
Can do one thing copy your json and create a structure from json after that you are able to deserializing json proper.
Thanks
Deepa
Yes, that usually the JSON format have incorrect format.
Try to get the JSON value and check it using JSON checker (ie : https://jsonformatter.org/)
Hi,
Actually the string that we are trying to parse is ^a-zA-Z0-9_.#$&()!{};,?/*C%:+=[|]'-@abcd"" , This string is coming from a PDF document. On upload of PDF document, We have to allow every special character to parse and exact same string should be visible on screen. But double quotes is causing an issue. Structure seems correct in my case.
Double quote ("") is escape character in Outsystems for quote (")
Yes, but is there any way to make it work in order to parse double quotes?
You can tried use quadruple quote ("""") so this will meaning escape for quote twice ("")
I tried Replace(Value ,"""","""""") but its still encountering an error.
Can you create mini app that have this problem, I'll check it.