[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
AW: Re: XML vs JSON
- From: "Peintner, Daniel" <daniel.peintner.ext@siemens.com>
- To: Mukul Gandhi <gandhi.mukul@gmail.com>, "xml-dev@l..."<xml-dev@l...>
- Date: Thu, 5 Oct 2017 09:07:08 +0000
Hi,
Many of these JSON<->XML tools provide a good coverage for some XML/JSON constructs but not for all.
The tool [1] you pointed to fails for example when converting the following "simple" JSON example to XML.
{ "a number": 1 }
The reason is rather simple. The qualified name in XML has some restrictions that are more rigid than the JSON fieldnames.
Hence, we in the EXI working group worked on a more sophisticated approach when converting JSON to XML infoset [2]. This requires escaping as shown here [3] for the example above.
Note1: The Efficient XML Interchange (EXI) format would not have the same restrictions as XML but the working group concluded that any EXI document should be convertible to XML.
Note2: The XSLT working group uses yet another scheme [4] which for EXI did not work given that we want to allow for user-defined XML schemas.
Having said that, there seem to be many approaches and solutions,
-- Daniel
[1] www.utilities-online.info/xmltojson/
[2]
https://www.w3.org/XML/EXI/docs/json/exi-for-json.html
[3]
https://www.w3.org/XML/EXI/docs/json/exi-for-json.html#exampleKeynameEscaping
[4] https://www.w3.org/TR/xslt-30/schema-for-json.xsd
Von: Mukul Gandhi [gandhi.mukul@gmail.com]
Gesendet: Freitag, 22. September 2017 08:08
An: xml-dev@lists.xml.org
Betreff: Re: XML vs JSON
|
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|