XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
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] XML vs JSON

On 8/1/2017 7:34 AM, Mukul Gandhi wrote:
When talking about designing REST services, JSON seems to clearly win.
The whole software world seems to be biased in favour of JSON it seems,
for this criteria. Although I have read, that in many cases REST
services can use XML instead of JSON. I think, JSON's major use case is
in the use within REST.
REST has nothing to do with either XML or JSON, and the concept of REST was solidified way before JSON existed. In REST, you receive a request, which for a long time was usually a web form - that is, content type = application/x-www-form-urlencoded - and in response you emit a document which represents some part of the state known to the server. The document can be text, XML, JSON, or something else.

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



[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