|-
| '''Summary'''
|Serializes the node specified by {{Code|$input}} as JSON, and returns the result as {{Code|xs:string}} instance. The serialized node must conform to the syntax specified by the [[#json:parse|json:parse()]] function.<br />XML documents Items can also be serialized as JSON if the [[Serialization|Serialization Option]] {{Code|method}} is set to {{Code|json}}.<br/>The {{Code|$options}} argument can be used to control the way the input is serialized.
|-
| '''Errors'''