Changes

Jump to navigation Jump to search
120 bytes removed ,  00:42, 26 May 2012
m
Text replace - "| valign='top' | " to "| "
|<code><b>json:parse</b>($input as xs:string()) as element(json)</code>
|-
| valign='top' | '''Summary'''
|Converts the JSON document specified by <code>$input</code> to XML, and returns the result as <code>element(json)</code> instance. The converted XML document is both well readable and lossless, i.e., the converted document can be serialized back to the original JSON representation.
|-
| valign='top' | '''Errors'''
|<b>[[XQuery Errors#BaseX Errors|BASX0015]]</b> is raised if the specified input cannot be parsed as JSON document.
|}
|<code><b>json:serialize</b>($input as node()) as xs:string()</code>
|-
| valign='top' | '''Summary'''
|Serializes the node specified by <code>$input</code> as JSON, and returns the result as <code>xs:string</code> instance. The serialized node must conform to the syntax specified by the [[#json:parse|json:parse()]] function.<br />XML documents can also be serialized as JSON if the [[Serialization|Serialization Option]] <code>"method"</code> is set to <code>"json"</code>.
|-
| valign='top' | '''Errors'''
|<b>[[XQuery Errors#BaseX Errors|BASX0016]]</b> is raised if the specified node cannot be serialized as JSON document.
|}
|<code><b>json:serialize-ml</b>($input as node()) as xs:string()</code>
|-
| valign='top' | '''Summary'''
|Serializes the node specified by <code>$input</code> and returns the result as <code>xs:string</code> instance.<br />XML documents can also be output in the JsonML format by setting the [[Serialization|Serialization Option]] <code>"method"</code> to <code>"jsonml"</code>.
|-
| valign='top' | '''Errors'''
|<b>[[XQuery Errors#BaseX Errors|BASX0016]]</b> is raised if the specified value cannot be serialized.
|}
|<code><b>json:parse-ml</b>($input as xs:string()) as element()</code>
|-
| valign='top' | '''Summary'''
|Converts the [http://jsonml.org JsonML] document specified by <code>$input</code> to XML, and returns the result as <code>element()</code> instance. The JSON input must conform to the JsonML specification to be successfully converted.
|-
| valign='top' | '''Errors'''
|<b>[[XQuery Errors#BaseX Errors|BASX0015]]</b> is raised if the specified input cannot be parsed as JsonML instance.
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu