Jump to navigation Jump to search
70 bytes removed ,  16:01, 19 November 2011
no edit summary
[[JSON Functions#json:parse|json:parse]] and [[JSON Functions#json:serialize|json:serialize]] facilitate a lossless conversion from JSON to XML and back. The transformation is based on the following rules:
# The resulting document has a <code><json/></code> root node.
# Names (keys) of objects are represented as elements:
| 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 Functions#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'''
[[JSON Functions#json:serialize-ml|json:serialize-ml]] and [[JSON Functions#json:parse-ml|json:parse-ml]] are used to transform XML to JSON and back, using the [ JsonML] dialect. JsonML can be used to transform arbitrary XML documents, but namespaces, comments and processing instructions will be discarded in the transformation process. More details are found in the official [ JsonML documentation].
Bureaucrats, editor, reviewer, Administrators


Navigation menu