Changes

Jump to navigation Jump to search
156 bytes added ,  14:18, 20 July 2022
no edit summary
{| width='100%'
|-valign="top"
| width='120' | '''Signatures'''
|{{Func|json:doc|$uri as xs:string|item()?}}<br />{{Func|json:doc|$uri as xs:string, $options as map(*)?|item()?}}<br />
|-valign="top"
| '''Summary'''
|Fetches the JSON document referred to by the given {{Code|$uri}} and converts it to an XQuery value. The {{Code|$options}} argument can be used to control the way the input is converted.
|-valign="top"
| '''Errors'''
|{{Error|parse|#Errors}} the specified input cannot be parsed as JSON document.<br/>{{Error|options|#Errors}} the specified options are conflicting.
{| width='100%'
|-valign="top"
| width='120' | '''Signatures'''
|{{Func|json:parse|$string as xs:string?|item()?}}<br/>{{Func|json:parse|$string as xs:string?, $options as map(*)?|item()?}}
|-valign="top"
| '''Summary'''
|Converts the JSON {{Code|$string}} to an XQuery value. If the input can be successfully parsed, it can be serialized back to the original JSON representation. The {{Code|$options}} argument can be used to control the way the input is converted.
|-valign="top"
| '''Errors'''
|{{Error|parse|#Errors}} the specified input cannot be parsed as JSON document.<br/>{{Error|options|#Errors}} the specified options are conflicting.
{| width='100%'
|-valign="top"
| width='120' | '''Signatures'''
|{{Func|json:serialize|$input as item()?|xs:string}}<br/>{{Func|json:serialize|$input as item()?, $options as map(*)?|xs:string}}
|-valign="top"
| '''Summary'''
|Serializes the specified {{Code|$input}} as JSON, using the specified {{Code|$options}}, and returns the result as string:
* The parameter {{Code|method}} needs to be set to {{Code|json}}, and
* the options presented in this article need to be assigned to the {{Code|json}} parameter.
|-valign="top"
| '''Errors'''
|{{Error|serialize|#Errors}} the specified node cannot be serialized as JSON document.
! width="110"|Code
|Description
|-valign="top"
|{{Code|options}}
|The specified options are conflicting.
|-valign="top"
|{{Code|parse}}
|The specified input cannot be parsed as JSON document.
|-valign="top"
|{{Code|serialize}}
|The specified node cannot be serialized as JSON document.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu