ICT Role in 21st Century Education & its Challenges.pptx
Json
1.
2. Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
6. What is JSON?
• Stands for JavaScript Object Notation
• Is lightweight format for exchanging data
between the client and server.
• Easy for humans to read and write.
• Easy for machines to parse and generate
7. Why JSON?
•
•
•
•
•
JSON is recognized natively by JavaScript
Simple format
The easiness of reading
The easiness of using
Lighter than XML
8. JSON Syntax
• For objects start the object with “{“ and end it
with “}”
• For members (properties), use pairs of string :
value and separate them by commas
• For arrays put the arrays between []
• For elements put the values directly separated
by commas.
9. Example
In JSON :var myFirstJSON =
{
"firstName" : "John",
"lastName" : "Doe",
"age"
: 23
};
In XML :<myFirstJSON>
<firstname>John</firstname>
<lastname>Doe</llastname>
<age>23</age>
</myFirstJSON>
10. JSON Parser
• You can convert JSON object into JSON text
• Object to Text Conversion
var myJSONText = myObject.toJSONString();
11. Accessing Data in JSON
• The most common way to access JSON data is
through dot notation.
var myObject = { 'color' : 'blue' };
document.writeln(myObject.color);
12. If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
13. Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550
Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com
NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550