Can we replace XML with JSON entirely?

Posted by Saeed Neamati on Programmers See other posts from Programmers or by Saeed Neamati
Published on 2011-09-16T10:33:35Z Indexed on 2013/06/25 10:28 UTC
Read the original article Hit count: 503

Filed under:
|

I'm sure lots of developers are familiar with XML and JSON, and they've used both of them. Thus no point in explaining what they are, and what is their purpose, even in brief.

If we try to map their concepts, we can say (correct me if I'm wrong):

  1. XML tags are equivalent to JSON {}
  2. XML attributes are equivalent to JSON properties
  3. XML tag collection is equivalent to JSON []

The only thing I can think of, which doesn't exist in JSON, is XML Namespaces.

The question is, considering this mapping, and considering that JSON is highly lighter in this mapping, can we see a world in future (or at least theoretically think of a world) without XML, but with JSON doing everything XML does? Can we use JSON everywhere XML is used?

PS: Please note that I've seen this question. It's something entirely different from what I'm asking here. Thus please don't mention duplicate.

© Programmers or respective owner

Related posts about Xml

Related posts about JSON