XML vs. JSON. Which one should be used and preferred?

XML

  • XML stands for eXtensible Markup Language.
  • It is a platform independent language
  • XML is designed to carry data, not to display data (HTML is used to display data)
  • XML tags are user defined and are case sensitive


JSON

  • JSON stands for JavaScript Object Notation
  • JSON is language independent
  • JSON is lightweight, faster and easier to parse than XML
  • It is derived from the JavaScript
  • When data is encoded in XML, the result is typically larger than an equivalent encoding in JSON, mainly because of XML's closing tags.
  • JSON has all of the advantages of XML + it is much better suited to data-interchange, as XML is not well suited to data-interchange.

No comments:

Post a Comment