[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: use of JSON instead of XML

  • From: Gareth Oakes <goakes@gpsl.co>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Mon, 25 Jun 2018 22:41:10 +0000

Re:  use of JSON instead of XML
I'm normally quite good at holding back from JSON vs XML discussions, but a recent project has made one point quite clear to me. JSON is often selected pragmatically, my reasoning is presented below.

>  On 25/06/18 06:17, Mukul Gandhi wrote:[...]
>  > 2) Architects have been choosing JSON in general, instead of XML as a
>  > data exchange syntax. Perhaps this is because, JSON is simple to use
>  > instead of XML.
>    This is a popular fallacy, exposed many times, most recently by Debbie
>    Lapeyre in her closing keynote at the MarkupUK Conference in London a
>    few weeks ago.

Firstly, I'm not convinced it is a fallacy (that Architects are choosing JSON over XML). I believe XML is a dirty word in many circles and architects will choose JSON or YAML or something else when it suits. When the data model is mismatched, e.g. narrative data vs row-by-column data, it is often a case of horses-for-courses. XML or HTML are a good choice for narrative data. I can only think of a few examples of serious systems where JSON is used for narrative data (e.g. eLife Lens).

On to my actual point. One sound reason that JSON is selected is pragmatism. JSON is a Javascript-native format that you can easily use within Javascript, with few surprises and little training. Javascript is the language of choice for so many client and server side systems and applications these days. Unfortunately the E4X initiative, which seemed so promising in its early days, ended up being a complete mess as it didn't support XML properly.

I'm certain others on this list will quote a variety of useful Github libraries, npm packages, or jQuery/ExtJS/etc. framework methods that help with XML; my point is that these are considered ways of *dealing with* XML. XML is not at the heart of the Javascript language as a first-class citizen (unlike the XSLT language). I feel that something like E4X was the right approach, but a poor technical design and implementation.

In summary; I'm not sure what the overall point of my argument is, if it even is an argument :) I feel that, given the primacy of Javascript, most of the time JSON is the safe choice because it is easy to work with given developers' existing toolsets and training.

// Gareth Oakes
// Chief Architect, GPSL
// www.gpsl.co

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


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
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.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.