Implement serialization to JSON
The Saxon-JS implementation of fn:serialize() is non-conformant (see https://www.saxonica.com/saxon-js/documentation/index.html#!conformance/xslt30 and https://saxonica.plan.io/boards/5/topics/6696). It's generally on our "todo" list to improve the implementation.
The suggested mechanisms for conversion from a JSON object to a XDM map, and back, are then:
Updated by Debbie Lockett over 5 years ago
Further details added to the documentation (under conformance/xslt30) to document the restrictions for the relevant serialization parameters, for serialization to JSON:
byte-order-markis ignored, the default is "no"
encodingis ignored, the default is "utf-8"
indentis ignored, no extra whitespace is added
json-node-output-methodis ignored, serialization of nodes calls
normalization-formis ignored, the default is "none"
Please register to edit this issue