[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
RE: [xml-dev] XML vs JSON
- From: "Rushforth, Peter (NRCan/RNCan)" <peter.rushforth@canada.ca>
- To: Julian Reschke <julian.reschke@gmx.de>, Thomas Passin<list1@tompassin.net>, "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
- Date: Tue, 1 Aug 2017 15:12:12 +0000
> -----Original Message-----
> From: Julian Reschke [mailto:julian.reschke@gmx.de]
> Sent: August 1, 2017 10:11
> To: Thomas Passin <list1@tompassin.net>; xml-dev@lists.xml.org
> Subject: Re: [xml-dev] XML vs JSON
>
> On 2017-08-01 14:58, Thomas Passin wrote:
> > ...
> > You personally may think it is "easier" to extract the data from a
> > JSON response compared with an XML response, or you personally may
> > happen to encounter more JSON interfaces, but others have different
> > experiences and would be happier with XML or something else. It has
> > little to do with being REST or not.
> >
> > TomP
>
> In particular, as JSON isn't that great wrt the protocol being driven by
> "hypermedia"...
While I believe that's true, I also think that XML is not very good at being driven by hypermedia, with perhaps the exceptions of the HTML and possibly Atom variants, not because of
an inherent characteristic of the format, but because people haven't made created hypermedia media types (to my knowledge).
I tend to think that XML is a good fit for hypermedia because of the mixed content (links in text content) and because of
the audience: browser developers are familiar with the challenges of parsing and presenting a DOM API as the standard programming
interface to documents. JSON is a better fit for web developers who are using JavaScript.
Although I was recently pleasantly surprised to find support for XPath available in JavaScript: https://developer.mozilla.org/en/docs/Introduction_to_using_XPath_in_JavaScript ,
not to mention that an XML parser is built in to browsers and so XML can be readily used by Web site programmers via XHR etc.
I am still surprised by the fact that XML didn't give rise to an ecosystem of "vertical" hypermedia media types. Perhaps that was due to too much intellectual and marketing capital being spent on web services,
and the consequent cynicism of the Web developer community.
I would be very interested to hear of other XML-based hypermedia vocabularies and what approaches they have used.
Regards,
Peter Rushforth
Technology Advisor
Canada Centre for Mapping and Earth Observation / Earth Sciences Sector
Natural Resources Canada / Government of Canada
Conseiller technique
Centre canadien de cartographie et d’observation de la Terre / Secteur des sciences de la Terre
Ressources naturelles Canada / Gouvernement du Canada
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]