[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Best options for converting JSON to XML
- From: Michael Kay <mike@saxonica.com>
- To: Hermann Stamm-Wilbrandt <STAMMW@de.ibm.com>
- Date: Sat, 9 Nov 2013 17:23:51 +0000
With specific relevance to the requirement for XSD validation, one of the main differences between different JSON-to-XML mappings is whether JSON keys end up mapping to element names or to data values (typically attribute values): does {'colour':'red'} become <colour>red</colour>, or <pair key="colour" value="red"/>?
The trouble with mapping keys to element names is that a key can be any string, and not all strings are valid element names. But XSD validation is strongly driven by element names, so if you map keys to attribute values, it's going to be hard to define the constraints in XSD.
Michael Kay
Saxonica
On 9 Nov 2013, at 16:56, Hermann Stamm-Wilbrandt <STAMMW@de.ibm.com> wrote:
> Hi,
>
> there was no standard for JSON2XML conversion (and back) in 2009.
> DataPower appliances needed that, as well as DB2.
> So an IBM internal JSONX standard was created.
>
> Later it was submitted but did just expire in November 2011:
> http://tools.ietf.org/html/draft-rsalz-jsonx-00
>
> Here is an example:
> http://pic.dhe.ibm.com/infocenter/wsdatap/v3r8m1/index.jsp?topic=%2Fxb60%2Fconvertingbetweenjsonandjsonx07.htm
>
> There are many other ways to represent JSON in XML, each with different set
> of positive/negative features.
>
>
> Mit besten Gruessen / Best wishes,
>
> Hermann Stamm-Wilbrandt
> Level 3 support for XML Compiler team and Fixpack team lead
> WebSphere DataPower SOA Appliances
> https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/
> https://twitter.com/HermannSW/ http://www.stamm-wilbrandt.de/ce/
> ----------------------------------------------------------------------
> IBM Deutschland Research & Development GmbH
> Vorsitzende des Aufsichtsrats: Martina Koederitz
> Geschaeftsfuehrung: Dirk Wittkopp
> Sitz der Gesellschaft: Boeblingen
> Registergericht: Amtsgericht Stuttgart, HRB 243294
>
>
>
> From: Ihe Onwuka <ihe.onwuka@gmail.com>
>
> To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>,
>
> Date: 11/09/2013 05:25 PM
>
> Subject: [xml-dev] Best options for converting JSON to XML
>
>
>
>
>
>
> I am considering alternatives to JSON Schema for validating JSON so
> the natural idea is to convert to XML and use some sort of schema.
>
> I'd be grateful for thoughts on the advisability of this type of
> thinking in the first place and suggestions for converting the JSON to
> XML.
>
> thanks
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>
>
>
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]