Introduction to
JSON
Agenda
Agenda
What is
JSON?
What is
JSON?
 JSON stands for JavaScript Object Notation.
 JSON is a syntax for storing and exchanging data.
 The format was specified by Douglas Crockford.
 Basically it was designed for human readable data interchange.
 JSON is text written with JavaScript Object Notation.
 It has been extended from the JavaScript Scripting Language.
 The filename extension is .json.
 JSON internet media type is application/json.
Uses
Uses of
JSON
 Helps you to transfer data from server.
 JSON format helps transmit and serialize all types of structured data.
 Allows you to perform asynchronous data call without the need to the
page refresh (AJAX- Asynchronous JavaScript and XML).
 It is widely used for JavaScript-based application, which includes
browser extension and website).
 You can transmit the data between server and web-application using
JSON.
 We can use JSON with modern programming languages.
 It is used for writing the JavaScript-based applications that include
browser add-on’s.
 Web services and API’s use the JSON format to get public data.
Characteristi
cs
 JSON is easy to read and write.
 It is lightweight text-based interchange format.
 JSON is language independent.
Characteristi
cs
JSON Data
Type
JSON Data
Type
 Numbers
 String
 Boolean
 Null
 Object
 Array
Data Types
 String
String in JSON must be written in double quotes.
Ex.
{“name”: ”John”}
 Numbers
Numbers in JSON must be an integer or a floating point.
Ex.
{“age”:30}
 Object
Values in JSON can be object
Ex.
{
“employee” : {“name” : ”John”, “age” : 30, “city” : ”New York”}
}
Data Types
 Array
Values in JSON can be arrays.
Ex.
{
“employees” : [“john”, “Anna”, “Peter”]
}
 Boolean
Values in JSON can be true/false.
Ex.
{“sale” :true}
 Null
Values in JSON can be null.
Ex.
{“middlename” :null}
JSON
Syntax
JSON Syntax
 Data should be in name/value pairs.
 Data should be separated by commas.
 Curly braces should hold objects.
 Square brackets hold arrays.
Thank you!

Introduction to JavaScript Object Notation(JSON)

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
    What is JSON?  JSONstands for JavaScript Object Notation.  JSON is a syntax for storing and exchanging data.  The format was specified by Douglas Crockford.  Basically it was designed for human readable data interchange.  JSON is text written with JavaScript Object Notation.  It has been extended from the JavaScript Scripting Language.  The filename extension is .json.  JSON internet media type is application/json.
  • 6.
  • 7.
    Uses of JSON  Helpsyou to transfer data from server.  JSON format helps transmit and serialize all types of structured data.  Allows you to perform asynchronous data call without the need to the page refresh (AJAX- Asynchronous JavaScript and XML).  It is widely used for JavaScript-based application, which includes browser extension and website).  You can transmit the data between server and web-application using JSON.  We can use JSON with modern programming languages.  It is used for writing the JavaScript-based applications that include browser add-on’s.  Web services and API’s use the JSON format to get public data.
  • 8.
  • 9.
     JSON iseasy to read and write.  It is lightweight text-based interchange format.  JSON is language independent. Characteristi cs
  • 10.
  • 11.
    JSON Data Type  Numbers String  Boolean  Null  Object  Array
  • 12.
    Data Types  String Stringin JSON must be written in double quotes. Ex. {“name”: ”John”}  Numbers Numbers in JSON must be an integer or a floating point. Ex. {“age”:30}  Object Values in JSON can be object Ex. { “employee” : {“name” : ”John”, “age” : 30, “city” : ”New York”} }
  • 13.
    Data Types  Array Valuesin JSON can be arrays. Ex. { “employees” : [“john”, “Anna”, “Peter”] }  Boolean Values in JSON can be true/false. Ex. {“sale” :true}  Null Values in JSON can be null. Ex. {“middlename” :null}
  • 14.
  • 15.
    JSON Syntax  Datashould be in name/value pairs.  Data should be separated by commas.  Curly braces should hold objects.  Square brackets hold arrays.
  • 16.