The below following points defines the JSON.
JSON is based on two types of structures:
These are universal data structures. They are essentially supported by all contemporary or modern programming languages. It makes sense for a data format to be built on these structures and to be convertible with computer languages.
XML stands for extensible Markup Language similar to HTML, where HTML stands for Hypertext Markup language. HTML is used for creating websites, whereas XML can be used for any kind of structured data. The whole structure of XML and XML-based languages is built on tags. So XML is used to store and transport data.
The tags are work in XML similar to HTML. The start tags start with the < > and end with the </ >. The start and end tag text must match.
JSON Popularity Graph
From desktop to web and mobile, nearly all computer applications that we use today rely on one of two principal message standards: JSON and XML. Today, JSON is the most widely-used format, but it only overtook XML within the last five years. The history and evolutionary path of the web has played a significant role in the popularization of JSON. According to Stack Overflow, more questions are now asked about JSON than about other data interchange formats.
According to Google Trends,
|2||The extension of json file is .json.||The extension of xml file is .xml.|
|3||Less code is created than XML||More code require than JSON|
|4||The data types supported by JSON are strings, numbers, Booleans, null, array.||XML data is in a string format.|
|5||JSON has no tags.||XML data is represented in tags with start tag and end tag.|
|6||JSON can use arrays to represent the data.||XML does not contain the concept of arrays.|
|7||It is less secure than XML.||It is more secure than JSON.|
|8||JSON is data-oriented.||XML is document-oriented.|
|9||The internet media type is application/json.||The internet media type is application/xml or text/xml.|
|10||It is a language-independent data-interchange format.||It is an independent data format.|