Hi Hans-Jürgen,
Maybe this thread and the linked sources can shed some light on the annoying slash escaping:
https://www.mhonarc.org/archive/html/xsl-list/2019-10/msg00078.html
Gerrit
On 20.03.2021 11:11, Hans-Juergen Rennau wrote:
Dear BaseX team,
there is something I don't understand about the parsing/serializing of JSON.
When I serialize a document without options, backslashes are escaped. So for example ...
<url>https://help.openconnectors.ext.hana.ondemand.com/home/google-analytics</url> becomes "url":"https://help.openconnectors.ext.hana.ondemand.com/home/google-analytics"
Only using serialization options - map{"escape": "no"} - do I get the output as expected, corresponding to the input.
Why are slashes by default escaped when serializing JSON?
Kind regards, Hans-Jürgen
PS: When parsing, the slashes are not escaped, so it is "asymmetrical" - I need to parse without options, yet to serialize with options.