Json vs XML(Comparison)

Json and xml are simple and open data interchange or language independent, both supports Unicode. But there are several difference, when we compare this two, here find the data along with differences.

JSON stands for JavaScript Object Notation.XML stands for eXtensible Markup Language.
JSON is simple to read and write.XML is less simple than JSON.
JSON is easy to learn.XML is less easy than JSON.
JSON is data-oriented.XML is document-oriented.
JSON doesn't provide display capabilities.XML provides the capability to display data because it is a markup language.
JSON supports array. XML doesn't support array.
JSON is less secured than XML. XML is more secured.
JSON files are more human readable than XML. XML files are less human readable.
JSON supports only text and number data type. XML support many data types such as text, number, images, charts, graphs etc. Moreover, XML offeres options for transferring the format or structure of the data with actual data.

JSON Example Code

var myData [{
"firstName":"William Henry", "lastName":"Gates" "founder of": "Microsoft"},
 "founder of": "Google"},
  {"firstName":"Mark", "lastName":"Zuckerberg " "founder of": "Facebook"

XML Example Code

    < founder >
        <firstName> William </firstName> <lastName> Gates</lastName> Microsoft
    < founder >
        <firstName> Larry </firstName> <lastName> page</lastName>Google
    < founder >
        <firstName> Mark <firstName> <lastName> Zuckerberg </lastName>Facebook