What are the advantages of JSON over XML?

Solution

  JSON XML
   JSON stands for "Java Script and Object Notation".  XML stands for "Extensible Markup Language".
Syntax and Verbosity JSON is much simpler than XML. JSON has a much smaller grammar and maps more directly onto the data structures.  XML contains start tag and end tags. Moreover it takes more number of characters to show data as compared to JSON.
Speed  JSON is light weighted. Hence it is faster than XML.  Due to tags and additional data, XML becomes heavy. Hence it is not as fast as JSON.
Document Sharing  Json typically is used to exchange traditional data formats like string, array and integers.  XML allows you to include data types like images, charts, and graphs which makes it more rich if you have to share and exchange such data.
Orientation  Json is data oriented, hence it can be easily mapped.  XML is document oriented, hence it requires more effort to map.
Usage   Used where speed is concern. For example: Mobile Application.  Used with SOAP web services to exchange data, used for configuration data.

Share this thread

Comments

Comments
comments powered by Disqus

Navigation

Social Media