JSON Introduction
- JSON is the lightweight syntax to store and interchange text information that can be read by many programming languages.
- JSON is supported by many modern browsers.
- JSON was developed by Douglas Crockford and presented to the Internet community in 2006.
- JSON was formally made part of the ECMAScript standard, on which JavaScript is based, as of the Fifth Edition finalized in April 2010.
What is JSON?
- JSON Stands for JavaScript Object Notation
- JSON is used to store and exchange text information much like XML
- JSON is faster than XML and easier to parse
- JSON is lightweight and self-descriptive
- JSON is language independent though it uses JavaScript
- JSON is easy to understand.
Example
"student": [{
"firstName": "Mithilesh",
"lastName": "Kumar"
},
{
"firstName": "Sanjeev",
"lastName": "Kumar"
}, {
"firstName": "Sonu",
"lastName": "Singh"
}
] }
In the above snippet, We have stored three student records and we can write above Code in XML as below –
<student>
<firstName>Mithilesh</firstName>
<lastName>Kumar</lastName>
</student>
<student>
<firstName>Sanjeev</firstName>
<lastName>Kumar</lastName>
</student>
<student>
<firstName>Sonu</firstName>
<lastName>Singh</lastName>
</student>
No comments:
Post a Comment