Am 27.02.2020 um 08:25 schrieb Johannes Bauer:
Am 27.02.2020 um 08:15 schrieb Martin Honnen:
Am 27.02.2020 um 07:49 schrieb Johannes Bauer:
I'm trying to deactivate the escaping of characters for JSON serialization.
It does not work with this:
let $json := <map xmlns="http://www.w3.org/2005/xpath-functions"> <string key="url">http://some.url/path/to/somewhere</string></map> return json:serialize($json, map {'format' : 'basic', 'escape': 'no'})
Output: { "url":"http://some.url/path/to/somewhere" }
Does
serialize(<map xmlns="http://www.w3.org/2005/xpath-functions"> <string key="url">http://some.url/path/to/somewhere</string></map>, map { 'method' : 'json', 'use-character-maps' : map { '/' : '/'}})
do what you want?
unfortunately no, I still get the "/" in the output with:
serialize( <map xmlns="http://www.w3.org/2005/xpath-functions"> <string key="url">http://some.url/path/to/somewhere</string> </map>, map {'method': 'json', 'use-character-maps': map { '/' : '/'}, 'json': map {'format' : 'basic'}} )
Johannes