SlideShare a Scribd company logo
JSON
Team Members 
1. Anum Hanif 
2. Farina Khan 
3. Hafiza Areeba 
4. Haya Samar 
5. Maheen Ashraf 
6. Ramsha Arif 
7. Sadaf Allahdin 
8. Sobia Hashmi 
9. Sundus Munawar 
10. Zara Tariq
What is JSON? 
• Lightweight data-interchange format 
• Subset of JavaScript 
• Easy for humans to read and write 
• Easy for machines to parse and generate 
• Language independent 
JSON
Properties of JSON 
• Human and machine readable format. 
• Strict syntax and parsing requirements. 
• Represents the most general computer science 
data structures like records, lists and trees. 
JSON
Data Interchange 
• JSON is a simple, common representation of 
data. 
• Communication between servers and browser 
clients. 
JSON
Where to use JSON? 
• It is useful when writing any kind of JavaScript-based 
application. 
• I t is used primarily to transmit data between a 
server and web application. 
• JSON with PHP 
• JSON with Perl 
• JSON with Python 
• JSON with JavaScript 
JSON
Where to use JSON? 
• JSON with PHP 
• json_encode 
• json_decode 
• json_last_error 
• JSON with Perl 
• to_json 
• from_json 
• convert_blessed 
JSON
Where to use JSON? 
• JSON with Python 
JSON 
• encode 
• decode 
• JSON with Javascript 
• JSON.stringify 
• JSON.parse
Why JSON ? 
• JSON is syntax for storing and exchanging text 
information. 
• The JSON text format is syntactically identical 
to the code for creating JavaScript objects. 
• Because of this similarity, instead of using a 
parser, a JS program can use the built-in 
functions and execute JSON data to produce 
native JavaScript objects. 
JSON
Why JSON ? 
• 3 Reasons why you should use JSON 
• Clean data 
• Efficiency 
• Scalability 
• As compared to XML, JSON is 
JSON 
• smaller 
• faster and 
• easier to parse
How to use it..? 
• JSON syntax is a subset of JavaScript syntax 
• Json Syntax Rules 
• Data is in name/value pairs 
• Data is separated by commas 
• Curly braces hold objects 
• Square brackets hold arrays 
• JSON Name/Value Pairs 
• JSON data is written as name/value pairs 
• Example 
• "firstName" : "John" 
JSON
How to use it..? 
• JSON values can be 
 A number (integer or floating point) 
 A string (in double quotes) 
 A Boolean (true or false) 
 An array (in square brackets) 
 An object (in curly brackets) 
 null 
• JSON Objects 
 JSON objects are written inside curly brackets 
 Objects can contain multiple name/values pairs 
• Example 
{ "firstName":"John" , "lastName":"Doe" } 
JSON
How to use it..? 
Simple Example 
JSON
How to use it..? 
Result 
JSON
JSON vs. XML 
JSON 
JSON 
• JSON is a text-based 
format. 
• JSON data types: string, 
number, array, Boolean. 
• JSON does not contain 
start and end tags. 
• JSON include arrays. 
• JSON does not have 
support for Namespaces. 
XML 
• XML is a Markup 
Language. 
• XML data are all string. 
• Xml contain start and end 
tags. 
• XML doesn't include 
arrays. 
• XML supports 
Namespaces.
JSON vs. XML 
<?xml version=“1.0” encoding=“utf- 
8”?> 
<students> 
<student> 
<name>Ali</name> 
<age>20</age> 
<gender>male</gender> 
</student> 
<student> 
<name>Bilal</name> 
<age>21</age> 
<gender>male</gender> 
</student> 
</students> 
“students”= [ 
{“name”: “Ali”, “age”: “20”, 
“gender”: “Male”}, 
{“name”: “Bilal”, “age”: “21”, 
“gender”: “Male”} 
] 
JSON 
JSON XML
Examples Of JSON 
JSON
Examples Of JSON 
• Android weather app: 
JSON, HTTP, Async Task 
and Openweathermap 
HTTP Connection 
OpenWeatherMap API 
Async Task 
JSON Object and Parser 
Display Data 
JSON
JSON

More Related Content

PPTX
JSON: The Basics
PPTX
PPT
JavaScript Object Notation (JSON)
PDF
Introduction to JSON
PPTX
An Introduction To NoSQL & MongoDB
JSON: The Basics
JavaScript Object Notation (JSON)
Introduction to JSON
An Introduction To NoSQL & MongoDB

What's hot (20)

PDF
SOAP vs REST
PPTX
PPT
PDF
Angular
PDF
Oracle RDBMS architecture
PPT
Hibernate
PDF
Hibernate Presentation
PPTX
Introduction to Django Rest Framework
PPTX
Namespaces in C#
PDF
Express node js
PPT
Java Networking
PPTX
React-JS.pptx
PPT
Soap Vs Rest
PPTX
Chapter 1 introduction to sql server
ODP
Ms sql-server
PPTX
Physical architecture of sql server
PPT
PHP Workshop Notes
PPT
Sql server T-sql basics ppt-3
PPTX
Document object model(dom)
SOAP vs REST
Angular
Oracle RDBMS architecture
Hibernate
Hibernate Presentation
Introduction to Django Rest Framework
Namespaces in C#
Express node js
Java Networking
React-JS.pptx
Soap Vs Rest
Chapter 1 introduction to sql server
Ms sql-server
Physical architecture of sql server
PHP Workshop Notes
Sql server T-sql basics ppt-3
Document object model(dom)
Ad

Similar to JSON (20)

PPTX
JSON - (English)
PPTX
Unit-2.pptx
PPT
Json - ideal for data interchange
PPTX
JSON.pptx
PPTX
LU 1.3. JSON & XML.pptx about how they work and introduction
PDF
Data exploraAsaSAsAasASASasaSSastion.pdf
PPTX
All about XML, JSON and related topics..
PPTX
Data exchange over internet (XML vs JSON)
PPTX
Json training
DOCX
What is JSON? Why use JSON? JSON Types? JSON Helpful Tools?
PDF
JSON Learning
PPTX
JSON_FIles-Py (2).pptx
PDF
CS8651 IP Unit 2 pdf regulation -2017 anna university
PPTX
Json processing
PPT
Java Script Object Notation (JSON)
PDF
JSON PRETTIFY.pdf
PPTX
JSON Support in Salesforce - winter 12
PDF
Json tutorial, a beguiner guide
JSON - (English)
Unit-2.pptx
Json - ideal for data interchange
JSON.pptx
LU 1.3. JSON & XML.pptx about how they work and introduction
Data exploraAsaSAsAasASASasaSSastion.pdf
All about XML, JSON and related topics..
Data exchange over internet (XML vs JSON)
Json training
What is JSON? Why use JSON? JSON Types? JSON Helpful Tools?
JSON Learning
JSON_FIles-Py (2).pptx
CS8651 IP Unit 2 pdf regulation -2017 anna university
Json processing
Java Script Object Notation (JSON)
JSON PRETTIFY.pdf
JSON Support in Salesforce - winter 12
Json tutorial, a beguiner guide
Ad

More from Zara Tariq (12)

PPTX
Implementation and comparison of Low pass filters in Frequency domain
PPTX
Query optimization techniques in Apache Hive
PPTX
Design and evaluation of an io controller for data protection
PPT
Stochastic kronecker graphs
PPTX
Pull Vs. Push Production
PPTX
Crime Record Management System (CRMS)
PPTX
Crime Record Management System (CRMS)
PPTX
Interrupts
PPTX
INTERRUPTS
PPTX
Toys Vending Machine
PPTX
An Integrated Cloud Computing Architectural Stack
PPT
Face Detection and Recognition System
Implementation and comparison of Low pass filters in Frequency domain
Query optimization techniques in Apache Hive
Design and evaluation of an io controller for data protection
Stochastic kronecker graphs
Pull Vs. Push Production
Crime Record Management System (CRMS)
Crime Record Management System (CRMS)
Interrupts
INTERRUPTS
Toys Vending Machine
An Integrated Cloud Computing Architectural Stack
Face Detection and Recognition System

Recently uploaded (20)

PPTX
VERNACULAR_DESIGN_PPT FINAL WITH PROPOSED PLAN.pptx
PDF
The Basics of Presentation Design eBook by VerdanaBold
PPT
robotS AND ROBOTICSOF HUMANS AND MACHINES
PDF
SOUND-NOTE-ARCHITECT-MOHIUDDIN AKHAND SMUCT
PPT
pump pump is a mechanism that is used to transfer a liquid from one place to ...
PPT
aksharma-dfs.pptgfgfgdfgdgdfgdfgdgdrgdgdgdgdgdgadgdgd
PPTX
Media And Information Literacy for Grade 12
PPTX
22CDO02-IMGD-UNIT-I-MOBILE GAME DESIGN PROCESS
PPTX
a group casestudy on architectural aesthetic and beauty
PPTX
LITERATURE CASE STUDY DESIGN SEMESTER 5.pptx
PPTX
rapid fire quiz in your house is your india.pptx
PPTX
Presentation.pptx anemia in pregnancy in
PPT
EthicsNotesSTUDENTCOPYfghhnmncssssx sjsjsj
PPTX
22CDH01-V3-UNIT III-UX-UI for Immersive Design
PDF
Urban Design Final Project-Context
PDF
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
PDF
ART & DESIGN HISTORY OF VEDIC CIVILISATION.pdf
PPTX
UNIT III - GRAPHICS AND AUDIO FOR MOBILE
PPTX
2. Competency Based Interviewing - September'16.pptx
PDF
THEORY OF ID MODULE (Interior Design Subject)
VERNACULAR_DESIGN_PPT FINAL WITH PROPOSED PLAN.pptx
The Basics of Presentation Design eBook by VerdanaBold
robotS AND ROBOTICSOF HUMANS AND MACHINES
SOUND-NOTE-ARCHITECT-MOHIUDDIN AKHAND SMUCT
pump pump is a mechanism that is used to transfer a liquid from one place to ...
aksharma-dfs.pptgfgfgdfgdgdfgdfgdgdrgdgdgdgdgdgadgdgd
Media And Information Literacy for Grade 12
22CDO02-IMGD-UNIT-I-MOBILE GAME DESIGN PROCESS
a group casestudy on architectural aesthetic and beauty
LITERATURE CASE STUDY DESIGN SEMESTER 5.pptx
rapid fire quiz in your house is your india.pptx
Presentation.pptx anemia in pregnancy in
EthicsNotesSTUDENTCOPYfghhnmncssssx sjsjsj
22CDH01-V3-UNIT III-UX-UI for Immersive Design
Urban Design Final Project-Context
UNIT 1 Introduction fnfbbfhfhfbdhdbdto Java.pptx.pdf
ART & DESIGN HISTORY OF VEDIC CIVILISATION.pdf
UNIT III - GRAPHICS AND AUDIO FOR MOBILE
2. Competency Based Interviewing - September'16.pptx
THEORY OF ID MODULE (Interior Design Subject)

JSON

  • 2. Team Members 1. Anum Hanif 2. Farina Khan 3. Hafiza Areeba 4. Haya Samar 5. Maheen Ashraf 6. Ramsha Arif 7. Sadaf Allahdin 8. Sobia Hashmi 9. Sundus Munawar 10. Zara Tariq
  • 3. What is JSON? • Lightweight data-interchange format • Subset of JavaScript • Easy for humans to read and write • Easy for machines to parse and generate • Language independent JSON
  • 4. Properties of JSON • Human and machine readable format. • Strict syntax and parsing requirements. • Represents the most general computer science data structures like records, lists and trees. JSON
  • 5. Data Interchange • JSON is a simple, common representation of data. • Communication between servers and browser clients. JSON
  • 6. Where to use JSON? • It is useful when writing any kind of JavaScript-based application. • I t is used primarily to transmit data between a server and web application. • JSON with PHP • JSON with Perl • JSON with Python • JSON with JavaScript JSON
  • 7. Where to use JSON? • JSON with PHP • json_encode • json_decode • json_last_error • JSON with Perl • to_json • from_json • convert_blessed JSON
  • 8. Where to use JSON? • JSON with Python JSON • encode • decode • JSON with Javascript • JSON.stringify • JSON.parse
  • 9. Why JSON ? • JSON is syntax for storing and exchanging text information. • The JSON text format is syntactically identical to the code for creating JavaScript objects. • Because of this similarity, instead of using a parser, a JS program can use the built-in functions and execute JSON data to produce native JavaScript objects. JSON
  • 10. Why JSON ? • 3 Reasons why you should use JSON • Clean data • Efficiency • Scalability • As compared to XML, JSON is JSON • smaller • faster and • easier to parse
  • 11. How to use it..? • JSON syntax is a subset of JavaScript syntax • Json Syntax Rules • Data is in name/value pairs • Data is separated by commas • Curly braces hold objects • Square brackets hold arrays • JSON Name/Value Pairs • JSON data is written as name/value pairs • Example • "firstName" : "John" JSON
  • 12. How to use it..? • JSON values can be  A number (integer or floating point)  A string (in double quotes)  A Boolean (true or false)  An array (in square brackets)  An object (in curly brackets)  null • JSON Objects  JSON objects are written inside curly brackets  Objects can contain multiple name/values pairs • Example { "firstName":"John" , "lastName":"Doe" } JSON
  • 13. How to use it..? Simple Example JSON
  • 14. How to use it..? Result JSON
  • 15. JSON vs. XML JSON JSON • JSON is a text-based format. • JSON data types: string, number, array, Boolean. • JSON does not contain start and end tags. • JSON include arrays. • JSON does not have support for Namespaces. XML • XML is a Markup Language. • XML data are all string. • Xml contain start and end tags. • XML doesn't include arrays. • XML supports Namespaces.
  • 16. JSON vs. XML <?xml version=“1.0” encoding=“utf- 8”?> <students> <student> <name>Ali</name> <age>20</age> <gender>male</gender> </student> <student> <name>Bilal</name> <age>21</age> <gender>male</gender> </student> </students> “students”= [ {“name”: “Ali”, “age”: “20”, “gender”: “Male”}, {“name”: “Bilal”, “age”: “21”, “gender”: “Male”} ] JSON JSON XML
  • 18. Examples Of JSON • Android weather app: JSON, HTTP, Async Task and Openweathermap HTTP Connection OpenWeatherMap API Async Task JSON Object and Parser Display Data JSON

Editor's Notes

  • #4: The JSON format was originally specified by Douglas Crockford The JSON filename extension is .json.