Page 1 of 1

Decode JSON string

Posted: 2024-01-31 11:34:35
by marceltrou
I have a page resulting in a JSON string and some char are encoded with \uxxxx.
It is not decoded with HTMLdecode or URLdecode.
Is there a function to decode the string ?

Re: Decode JSON string

Posted: 2024-02-03 11:26:57
by antp
There is a DecodeJson fonction in JsonUtils.pas that you can use by adding "JsonUtils" to the "uses" line at the top of the script.