JSON (JavaScript Object Notation)- A lightweight data-interchange format which is completely language independent. It is based on the JavaScript programming language and easy to generate.
A JSON file will look something like this:-
{"User":[
{ "firstName":"Priyaj", "lastName":"Kumar" },
{ "firstName":"Omkar", "lastName":"Hiremath" },
{ "firstName":"Kalgi", "lastName":"Shah" },
]}
XML(Extensible Markup Language)- It is used to carry data and not display data. XML is a markup language that is used to define a set of rules for encoding the document in a format that is both human-readable and machine-readable.
The XML file will look something like this:-
<User>
<User>
<firstName>Priyaj</firstName> <lastName>Kumar</lastName>
</User>
<User>
<firstName>Omkar</firstName> <lastName>Hiremath</lastName>
</User>
<User>
<firstName>Kalgi</firstName> <lastName>Shah</lastName>
</User>
</User>