SlideShare a Scribd company logo
• JSON stands for JavaScript Object Notation
• JSON is a text format for storing and transporting data
• JSON is "self-describing" and easy to understand
• JSON is a lightweight Data-Interchange Format.
• JSON Is Programming Language Independent
• Subset of Javascript Object literal
• easy to read
• Minimum bandwidth is needed to interchange data
• Supports in all browsers
JSON SYNTAX
{key:value}
JSON RULES
• Must create data within curly brackets {}
• {json data}
• Data must be written with key-value pairs
• {key: value}
• Key and value must be separated by colon :
• {“name” : “ram”}
• key should be double-quoted, if the value is a string then it must be
double-quoted
• {“name” : “sita”}
• {“age” : 21}
• When multiple data are used then it should be separated by a comma
• {“name” : “ram” , {“age” : 21}
• When array data are used then it should be represented in square
brackets[]
• {“marks” : [12,61,99]}
• curly brackets are used to store/hold/represent objects
JSON as a document
• JSON data can be created in an external file with an extension as.json
JSON Datatypes
 Number: Integer, Floating point number
Eg: {"regno":101, "cgpa":9.1}
 String: Text with double quotes
Eg:{"name": "John"}
 Boolean: true or false
Eg: {"sale": true}
 Array: Square brackets[]
Eg: { "employees":["John", "Anna", "Peter"] }
 Object: curly brackets, can have objects within objects.
Eg: { "employee":{"name": "John", "age":30} }
 Null: null
Eg: {“middle name": null}
 Number, String, Boolean Values(Literals) data types
Eg1:{ "brand": "Crocs", "color": "pink", "size": 9, "hasLaces": false }
Eg2: {
"brand": "Crocs",
"color": "pink",
"size": 9,
"hasLaces": false
}
 Arrays
Eg1:{"fruits":
["apple","orange","mango","pineap
ple","grapes"]}
Eg2: {"scores":[98,23,78,89,97]}
 Objects
{
"book1":
{
"title":"Life",
"author":"Luther",
"stock": 18,
"price":2000
}
}
Nested JSON Objects
{
"students": {
"cse":{
"URK20CS1001" : {"name":"John","cgpa":8.7},
"URK20CS1002" : {"name":"Grace","cgpa":7.7},
"URK20CS1003" : {"name":"Lincy","cgpa":9.7}
}
},
"faculty":{
"cse":{
"678":{"name":"Ashok", "gender":"male","place":"Chennai"},
"857":{"name":"Arun","gender":"male","place":"Coimbatore"}
}
}
Null
{
"person1":{
“first name":"John",
“middle name":null,
“last name": “William"
},
"person2":{
“first name":"David",
“Middlename":"Wilson",
“last name": null
}
<script>
var json= {
"array": [1,2,3],
"boolean": true,
"color": "gold",
"status": null,
"number": 123,
"object": {"a": "b", "c": "d"},
"string": "Hello World"
}
</script>
Example:
<script>
var user = new Object();
user.name="Ram";
user.age=23;
document.write("His Name is " +user.name + " <br>And his age is "
+user.age)
var user={
name:"SAM",
age:24
}
document.write("<br> His Name is " +user.name + " <br>And his age is "
+user.age)
</script>
JAVASCRIPT
JSON

More Related Content

PPT
java script json
PPTX
PPTX
JSON.pptx
PDF
Introduction to JSON
PPTX
Introduction to JavaScript Object Notation(JSON)
PPTX
JSON - (English)
PPTX
Json
java script json
JSON.pptx
Introduction to JSON
Introduction to JavaScript Object Notation(JSON)
JSON - (English)
Json

Similar to 1 Json Intro and datatype PRESENTATION.pptx (20)

PDF
Basics of JSON (JavaScript Object Notation) with examples
PPTX
Java script object notation(json)
PPTX
Json training
PPT
json.ppt download for free for college project
PPT
Java Script Object Notation (JSON)
PDF
Json
PPTX
json.pptx
PPT
Json – java script object notation
PPTX
JSON.pptx
PPT
JSON - Quick Overview
PPTX
LU 1.3. JSON & XML.pptx about how they work and introduction
PPT
JavaScript Object Notation (JSON)
PPTX
Java script and json
PDF
Intro to JSON
PDF
CS8651 IP Unit 2 pdf regulation -2017 anna university
PDF
JSON Learning
PPTX
unit5_part2.pptx
PDF
Json the-x-in-ajax1588
Basics of JSON (JavaScript Object Notation) with examples
Java script object notation(json)
Json training
json.ppt download for free for college project
Java Script Object Notation (JSON)
Json
json.pptx
Json – java script object notation
JSON.pptx
JSON - Quick Overview
LU 1.3. JSON & XML.pptx about how they work and introduction
JavaScript Object Notation (JSON)
Java script and json
Intro to JSON
CS8651 IP Unit 2 pdf regulation -2017 anna university
JSON Learning
unit5_part2.pptx
Json the-x-in-ajax1588
Ad

More from angelinjeba6 (20)

PPTX
NLP-Components NLP-ComponentsNLP-Components.pptx
PPTX
REVIEW_Practicum1_NLP REVIEW_Practicum1_NLP.pptx
PPTX
STUDENT ACTIVITIES_NLP STUDENT ACTIVITIES_NLP.pptx
PPTX
AI-in-Cybersecurity AI-in-Cybersecurity.pptx
PPTX
Applying-AIAI-in-CybersecurityAI-in-Cybersecurity-in-Cybersecurity.pptx
PPTX
Exercise no: 6 java script fundamentals.pptx
PPTX
1 Intro of web technology and sciences .pptx
PPT
rules classifier in machine learning .ppt
PPTX
21. Regression Tree in machine learning.pptx
PPTX
Loss function in machine learning .pptx
PPTX
Module 1 Taxonomy of Machine L(1).pptx
PPTX
decision tree DECISION TREE IN MACHINE .pptx
PPTX
K means ALGORITHM IN MACHINE LEARNING.pptx
PPTX
Support vector machine_new SVM presentation.pptx
PPTX
INTELL ACTUAL PROPERTY. INTELL ACTUAL PROPERTY.pptx
PPTX
Multiple Linear Regressionnnnnnnnnnn.pptx
PPTX
normalisation jdsuhduswwhdusw cdscsacasc.pptx
PPT
311----introduction tomachinelearning.ppt
PPTX
Dynamic and Embedded SQL for db practices.pptx
PPT
artificial engineering the future of computing
NLP-Components NLP-ComponentsNLP-Components.pptx
REVIEW_Practicum1_NLP REVIEW_Practicum1_NLP.pptx
STUDENT ACTIVITIES_NLP STUDENT ACTIVITIES_NLP.pptx
AI-in-Cybersecurity AI-in-Cybersecurity.pptx
Applying-AIAI-in-CybersecurityAI-in-Cybersecurity-in-Cybersecurity.pptx
Exercise no: 6 java script fundamentals.pptx
1 Intro of web technology and sciences .pptx
rules classifier in machine learning .ppt
21. Regression Tree in machine learning.pptx
Loss function in machine learning .pptx
Module 1 Taxonomy of Machine L(1).pptx
decision tree DECISION TREE IN MACHINE .pptx
K means ALGORITHM IN MACHINE LEARNING.pptx
Support vector machine_new SVM presentation.pptx
INTELL ACTUAL PROPERTY. INTELL ACTUAL PROPERTY.pptx
Multiple Linear Regressionnnnnnnnnnn.pptx
normalisation jdsuhduswwhdusw cdscsacasc.pptx
311----introduction tomachinelearning.ppt
Dynamic and Embedded SQL for db practices.pptx
artificial engineering the future of computing
Ad

Recently uploaded (20)

PPTX
climate analysis of Dhaka ,Banglades.pptx
PDF
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PPTX
Business Ppt On Nestle.pptx huunnnhhgfvu
PPTX
Business Acumen Training GuidePresentation.pptx
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
PPTX
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
PPTX
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
PPTX
Global journeys: estimating international migration
PPTX
Database Infoormation System (DBIS).pptx
PDF
Introduction to Business Data Analytics.
PDF
Foundation of Data Science unit number two notes
PDF
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
PPTX
Computer network topology notes for revision
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PDF
Launch Your Data Science Career in Kochi – 2025
PPT
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn
climate analysis of Dhaka ,Banglades.pptx
Recruitment and Placement PPT.pdfbjfibjdfbjfobj
Acceptance and paychological effects of mandatory extra coach I classes.pptx
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
Business Ppt On Nestle.pptx huunnnhhgfvu
Business Acumen Training GuidePresentation.pptx
.pdf is not working space design for the following data for the following dat...
DISORDERS OF THE LIVER, GALLBLADDER AND PANCREASE (1).pptx
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
Global journeys: estimating international migration
Database Infoormation System (DBIS).pptx
Introduction to Business Data Analytics.
Foundation of Data Science unit number two notes
TRAFFIC-MANAGEMENT-AND-ACCIDENT-INVESTIGATION-WITH-DRIVING-PDF-FILE.pdf
Computer network topology notes for revision
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Launch Your Data Science Career in Kochi – 2025
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn

1 Json Intro and datatype PRESENTATION.pptx

  • 1. • JSON stands for JavaScript Object Notation • JSON is a text format for storing and transporting data • JSON is "self-describing" and easy to understand • JSON is a lightweight Data-Interchange Format. • JSON Is Programming Language Independent • Subset of Javascript Object literal • easy to read • Minimum bandwidth is needed to interchange data • Supports in all browsers JSON SYNTAX {key:value}
  • 2. JSON RULES • Must create data within curly brackets {} • {json data} • Data must be written with key-value pairs • {key: value} • Key and value must be separated by colon : • {“name” : “ram”} • key should be double-quoted, if the value is a string then it must be double-quoted • {“name” : “sita”} • {“age” : 21}
  • 3. • When multiple data are used then it should be separated by a comma • {“name” : “ram” , {“age” : 21} • When array data are used then it should be represented in square brackets[] • {“marks” : [12,61,99]} • curly brackets are used to store/hold/represent objects JSON as a document • JSON data can be created in an external file with an extension as.json
  • 4. JSON Datatypes  Number: Integer, Floating point number Eg: {"regno":101, "cgpa":9.1}  String: Text with double quotes Eg:{"name": "John"}  Boolean: true or false Eg: {"sale": true}  Array: Square brackets[] Eg: { "employees":["John", "Anna", "Peter"] }  Object: curly brackets, can have objects within objects. Eg: { "employee":{"name": "John", "age":30} }  Null: null Eg: {“middle name": null}
  • 5.  Number, String, Boolean Values(Literals) data types Eg1:{ "brand": "Crocs", "color": "pink", "size": 9, "hasLaces": false } Eg2: { "brand": "Crocs", "color": "pink", "size": 9, "hasLaces": false }  Arrays Eg1:{"fruits": ["apple","orange","mango","pineap ple","grapes"]} Eg2: {"scores":[98,23,78,89,97]}
  • 7. Nested JSON Objects { "students": { "cse":{ "URK20CS1001" : {"name":"John","cgpa":8.7}, "URK20CS1002" : {"name":"Grace","cgpa":7.7}, "URK20CS1003" : {"name":"Lincy","cgpa":9.7} } }, "faculty":{ "cse":{ "678":{"name":"Ashok", "gender":"male","place":"Chennai"}, "857":{"name":"Arun","gender":"male","place":"Coimbatore"} } }
  • 8. Null { "person1":{ “first name":"John", “middle name":null, “last name": “William" }, "person2":{ “first name":"David", “Middlename":"Wilson", “last name": null }
  • 9. <script> var json= { "array": [1,2,3], "boolean": true, "color": "gold", "status": null, "number": 123, "object": {"a": "b", "c": "d"}, "string": "Hello World" } </script>
  • 10. Example: <script> var user = new Object(); user.name="Ram"; user.age=23; document.write("His Name is " +user.name + " <br>And his age is " +user.age) var user={ name:"SAM", age:24 } document.write("<br> His Name is " +user.name + " <br>And his age is " +user.age) </script> JAVASCRIPT JSON