Changes

Jump to navigation Jump to search
5 bytes removed ,  05:50, 7 February 2012
no edit summary
[http://www.json.org/ JSON (JavaScript Object Notation)] is a popular data exchange format for applications written in JavaScript. This module contains [[Querying#Functions|XQuery functions]] to parse and serialize JSON documents. All functions are preceded by the <code>json:</code> prefix, which is linked to the statically declared <code>http://basex.org/modules/json</code> namespace. The JSON module will be officially supported with the upcoming {{Version|7.0}} of BaseX.
As there are notable differences between JSON and XML, no mapping exists that guarantees a lossless, bidirectional conversion between JSON and XML. For this reason, we offer two sets of functions in this module:
=JSONFunctions=
[[#json:parse|json:parse]] and [[#json:serialize|json:serialize]] facilitate a lossless conversion from JSON to XML and back. The transformation is based on the following rules:
</json></pre>
=JsonMLFunctions=
[[#json:serialize-ml|json:serialize-ml]] and [[#json:parse-ml|json:parse-ml]] are used to transform XML to JSON and back, using the [http://jsonml.org 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 [http://jsonml.org/XML JsonML documentation].
"212 555-1234"]]
</pre>
 
=Recent Changes=
 
This module was introduced with Version 7.0.
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu