Revision [134]

This is an old revision of JsonXML made by DavidLee on 2011-02-03 05:39:44.
 

JSON XML Schema (JXML)


A proposal for a simple XML schema which represents JSON data.

Abstract

In order to generate, read, and process JSON data using XML Tools it is useful to model the JSON Data Model using XML instead of using the JSON Text Serialization format directly.

This proposal specifies an XML schema which directly models the JSON Data Model within XML. Simple tools can be used to translate to and from this schema to JSON Text Serialization, allowing XML tools to work with the JSON data model directly in XML.

Goals

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 a more usable XML format for particular applications.

Use Cases


Schema


The schema is based on the JSON data model as described at http://www.json.org. It consists of the following elements






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

Diagram

JXON Diagram

Download

The schema in XSD form (jxon.xsd) and diagram (jxon.jpg) may be downloaded here
  Attachment Size Date Added
      jxml.jpg   41.75 KB   2/03/2011 11:28 am
      jxml.xsd   1.22 KB   2/03/2011 11:28 am



There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki