fn:serialize-json
This function serializes the supplied value in JSON format.
serialize-json($arg as item()*) ➔ xs:string
Arguments | |||
| $arg | item()* | The value to be serialized as a JSON string |
Result | xs:string |
serialize-json($arg as item()*, $options as map(*)) ➔ xs:string
Arguments | |||
| $arg | item()* | The value to be serialized as a JSON string |
| $options | map(*) | JSON serialization options |
Result | xs:string |
Namespace
http://www.w3.org/2005/xpath-functions
Links to W3C specifications
Notes on the Saxon implementation
This function is specified in XSLT 3.0, and is available since Saxon 9.4, provided XSLT 3.0 is enabled.
The options recognized are escape=true|false
,
indent=true|false
, spec=RFC4234|ECMA-262
,
fallback=(function)
.