Any charactors not allowed within XML must be JSON escaped. This includes the unicode range
- 0x0000 - 0x0008
- 0x000B - 0x001F
- 0XFFFE-0xFFFF
All other characters should be represented natively in XML, and when text serialized entity encoded.
The goals of this schema are to provide a simple XML representation of the JSON data model. By defining JSON in XML, and accompanying tools for parsing and serializing to/from JSON to XML(JXON), XML tools can be used without reguards to JSON serialization itself and instead focus purely on the data model transformations.
The JXML schema is intended as a very simple schema which represents the entire JSON data model as directly as possible. It is not intended necessarily as the best schema to use to represent data in XML, but rather as a schema as close to the JSON data model as reasonable. Most likely use cases would involve transforming this to or from a more usable XML format for particular applications.
{{image url="http://xml.calldei.com/JsonXML/files.xml?action=download&file=jxml.jpg" title="JXML Diagram" alt="JXMLDiagram"}}
The schema in XSD form (jxml.xsd) and diagram (jxml.jpg) may be downloaded here
Deletions:
The goals of this schema are to provide a simple XML representation of the JSON data model. By defining JSON in XML, and accompanying tools for parsing and serializing to/from JSON to JXON, XML tools can be used without reguards to JSON serialization itself and instead focus purely on the data model transformations.
The JXON schema is intended as a very simple schema which represents the entire JSON data model as directly as possible. It is not intended necessarily as the best schema to use to represent data in XML, but rather as a schema as close to the JSON data model as reasonable. Most likely use cases would involve transforming this to or from a more usable XML format for particular applications.
{{image url="http://xml.calldei.com/JsonXML/files.xml?action=download&file=jxml.jpg" title="JXON Diagram" alt="JXON Diagram"}}
The schema in XSD form (jxon.xsd) and diagram (jxon.jpg) may be downloaded here
- object
- member
- boolean
- array
- string
- number
- null
===== Element object=====
Child Elements: zero or more "member" elements
===== Element member=====
Child Elements: Exactly one 'value' (object|boolean|array|string|number|null)
===== Element boolean=====
===== Element array=====
Child Elements: Zero or more 'value' (object|boolean|array|string|number|null)
===== Element string=====
===== Element number=====
===== Element null=====
Deletions:
- OBJECT
- MEMBER
- BOOLEAN
- ARRAY
- STRING
- NUMBER
- NULL
===== Element OBJECT=====
Child Elements: zero or more MEMBER
===== MEMBER=====
Child Elements: Exactly one 'value' (OBJECT|BOOLEAN|ARRAY|STRING|NUMBER|NULL)
===== BOOLEAN=====
===== ARRAY=====
Child Elements: Zero or more 'value' (OBJECT|BOOLEAN|ARRAY|STRING|NUMBER|NULL)
===== STRING=====
===== NUMBER=====
===== NULL===== true 1.23 spam
Child Elements: Exactly one 'value' (OBJECT|BOOLEAN|ARRAY|STRING|NUMBER|NULL)
Child Elements: Zero or more 'value' (OBJECT|BOOLEAN|ARRAY|STRING|NUMBER|NULL)
Deletions:
Child Elements: Exactly one 'value' (BOOLEAN|ARRAY|STRING|NUMBER|NULL)
Child Elements: Zero or more 'value' (BOOLEAN|ARRAY|STRING|NUMBER|NULL)
The JXON schema is intended as a very simple schema which represents the entire JSON data model as directly as possible. It is not intended necessarily as the best schema to use to represent data in XML, but rather as a schema as close to the JSON data model as reasonable. Most likely use cases would involve transforming this to or from a more usable XML format for particular applications.
Deletions:
The JXON schema is intended as a very simple schema which represents the entire JSON data model as directly as possible. It is not intended necessarily as the best schema to use to represent data in XML, but rather as a schema as close to the JSON data model as reasonable. Most likely use cases would involve transforming this to a more usable XML format for particular applications.
Using this schema and a supporting implementation, JSON may be 'round tripped' losslessy through XML. ( JSON -> XML -> JSON) but not visa-versa.
- Use of XML tools to generate JSON data without reguards to serialization issues.
- Use of XML tools to consume JSON data without regards to JSON parsing issues.
The JXML schema is supported by [[http://www.xmlsh.org xmlsh]] by the commands [[http://www.xmlsh.org/CommandJson2xml json2xml]] and [[http://www.xmlsh.org/CommandXml2json xml2json]]
Deletions:
The JXML schema is supported by [[http://www.xmlsh.org xmlsh]] in the tools [[http://www.xmlsh.org/CommandJson2xml json2xml]] and [[http://www.xmlsh.org/CommandXml2json xml2json]]
======Implementations======
The JXML schema is supported by [[http://www.xmlsh.org xmlsh]] in the tools [[http://www.xmlsh.org/CommandJson2xml json2xml]] and [[http://www.xmlsh.org/CommandXml2json xml2json]]
======Download======
The JXON schema is intended as a very simple schema which represents the entire JSON data model as directly as possible. It is not intended necessarily as the best schema to use to represent data in XML, but rather as a schema as close to the JSON data model as reasonable. Most likely use cases would involve transforming this to a more usable XML format for particular applications.
The schema is based on the JSON data model as described at [[http://www.json.org]]. It consists of the following elements
- OBJECT
- MEMBER
- BOOLEAN
- ARRAY
- STRING
- NUMBER
- NULL
===== Element OBJECT=====
Attributes: none
Child Elements: zero or more MEMBER
Text: empty
===== MEMBER=====
Attributes: name
Child Elements: Exactly one 'value' (BOOLEAN|ARRAY|STRING|NUMBER|NULL)
Text: empty
===== BOOLEAN=====
Attributes: none
Child Elements: none
Text: "true" or "false"
===== ARRAY=====
Attributes: none
Child Elements: Zero or more 'value' (BOOLEAN|ARRAY|STRING|NUMBER|NULL)
Text: none
===== STRING=====
Attributes: none
Child Elements: none
Text: The value of the string
===== NUMBER=====
Attributes: none
Child Elements: none
Text: the value of the number in XSD "double" format
===== NULL=====
Attributes: none
Child Elements: none
Text: empty
=====Download=====
The schema in XSD form (jxon.xsd) may be downloaded here
The goals of this schema are to provide a simple XML representation of the JSON data model. By defining JSON in XML, and accompanying tools for parsing and serializing to/from JSON to JXON, XML tools can be used without reguards to JSON serialization itself and instead focus purely on the data model transformations.
- Store JSON data in an XML database.
- Use of XML tools for JSON transformations.
- Use of XML tools for JSON data validation.
======Schema======
The schema may be downloaded here
{{files}}
Deletions:
====Definitions====
For the purposes of this document the following definitions apply