OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] use of JSON instead of XML

On Monday, June 25, 2018 11:35:35 AM EDT Michael Kay wrote:
> > That fallacy is about to be exposed. JSON is "simpler" to use because up
> > till now it has been used for simpler things.
> JSON *is* simpler to use for simple things, no doubt about it. Mainly
> because it is a much closer fit to the data models of conventional
> programming languages.

In JSON, each value is either a list of values or a set of key/value pairs. 
When the data model fits JSON, it's easy to use. It becomes hairy when values 
are html, xml, or json, because of escaping of double quotes. Most programming 
languages have matching data structures, so it's easy to use JSON to exchange 
them via an API. Also, JSON is fairly human readable, unless there is a lot of 

On the other hand, when your data are documents or when you don't mind writing 
a more complex (de)serialization code for your data structures to XML, XML 
provides better (de)serialization fidelity, more human readable than JSON, 
especially when values have few escaped angular brackets. Once you get over 
the hump of getting your data into XML, all the tooling that you can use for 
validation and transformation. That's the advantage of XML.

Nicholas Sushkin
Open Finance

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS