4.18.24 Movement Legacies, Reflection, and Review.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
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