|<b>[[XQuery Errors#BaseX Errors (BASX)|BASX0016]]</b> is raised if the specified node cannot be serialized as JSON document.
|}
==json:serialize-ml==
{|
|-
| valign='top' width='90' | '''Signatures'''
|<code><b>json:serialize</b>($input as node()) as xs:string()</code>
|-
| valign='top' | '''Summary'''
|Serializes the node specified by <code>$input</code> as described in the [http://jsonml.org JsonML] specification, and returns the result as <code>xs:string</code> instance. JsonML can be used to transform any XML representation to JSON and back.Note, however, that namespaces, comments and processing instructions will be discarded in the transformation process; more details are found in the official [http://jsonml.org/XML JsonML documentation].
|-
| valign='top' | '''Errors'''
|<b>[[XQuery Errors#BaseX Errors (BASX)|BASX0016]]</b> is raised if the specified node cannot be serialized as JSON document.
|}
==Examples==