Movatterモバイル変換


[0]ホーム

URL:


Adnan Sohail, profile picture
Uploaded byAdnan Sohail
PPT, PDF5,148 views

Java Script Object Notation (JSON)

JSON (JavaScript Object Notation) is a lightweight data format that is easy for humans to read and write and easy for machines to parse and generate. It is built upon two structures: collections of name-value pairs and ordered lists of values. JSON has advantages over XML as it is lighter, easier to parse, and does not require tags.

Embed presentation

Downloaded 559 times
JavaScript Object Notation (JSON) Compiled by  Adnan Sohail Software Engineer  i2c inc.
JSON JSON  (JavaScript Object Notation) is a lightweight data-interchange format.  It is easy for humans to read and write.  It is easy for machines to parse and generate.  It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999.  JSON is a text format that is completely language independent. These properties make JSON an ideal data-interchange language.
Why JSON? Because JSON is lightweight, easy to understand, manipulate and generate, it has almost replaced XML which was used previously as the only data-interchange format.  JSON is preferable because of the following reasons: XML is heavier than JSON  to parse XML, we have to use xPath which is an overhead removed in JSON because JSON is native to JavaScript  XML uses tags to describe user data and tags increase the size of data
JSON Structures JSON is built on two structures: A collection of name/value pairs.  In various languages, this is realized as an  object , record, dictionary, hash table, keyed list, or associative array. An ordered list of values.  In most languages, this is realized as an  array , vector, list, or sequence.
Syntax of JSON Object An  object  is an unordered set of name/value pairs.  An object begins with  {  (left brace)  and ends with  }  (right brace) .  Each name is followed by  :  (colon)   and the name/value pairs are separated by  ,  (comma) .
Syntax of JSON Array An  array  is an ordered collection of values.  An array begins with  [  (left bracket)   and ends with  ]  (right bracket) . Values are separated by  ,  (comma) .
Syntax of JSON A  value  can be a  string  in double quotes, or a  number , or true or false or null, or an  object  or an  array . These structures can be nested. A  string  is a collection of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A character is represented as a single character string. A string is very much like a C or Java string.
JSON Example { “students” :  [ {“id":1, "name":"Adnan Sohail"}, {“id":2, "name":"Irfan Razzaq"} ] }
XML Example <?xml version=&quot;1.0&quot; ?> <root> <student> <id>1</id> <name>Adnan Sohail</name> </student> <student> <id>2</id> <name>Irfan Razzaq</name> </student> </root>
Validating JSON & JSON Security JavaScript’s built-in method eval() is used to validate a JSON string. Note: Use eval() only when the source is authentic and trusted which means use it only if you are sure that the string passed to it is a valid JSON string When you’ve security risks use var myObject = myJSONtext.parseJSON(); Which is available in  http://www.json.org/json.js   but eval() is faster than parseJSON()
Using JSON APIs JSON strings can be easily generated using JSON APIs available at  http://json.org There are two main classes available in  org.json.*  package org.json.JSONObject org.json.JSONArray Strings can be generating from objects of  JSONObject  or  JSONArray  using their  toString()  methods
Benefits of JSON over XML JSON supports data types like string, integer, boolean etc.  JSON is native data format for JavaScript and therefore it faster for the browser to read and understand.  As JSON contains no tags but data and therefore less data to be transferred between client and the server. So, it’s lighter than XML.  Easy for humans to read and write.
JSON References http://www.xul.fr/en-xml-ajax.html http://www.xul.fr/ajax-javascript-json.html http://json.org/ http://www.json.org/java/

Recommended

PPTX
Apache doris (incubating) introduction
PDF
Introduction to XGBoost
PPTX
ELK Stack
PDF
A Brief History of Object Detection / Tommi Kerola
PPTX
Graph Neural Network (한국어)
PDF
IBM Watson Question-Answering System and Cognitive Computing
PDF
Model selection and tuning at scale
PDF
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
PPTX
K nearest neighbor
PDF
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
PDF
Xgboost
PPTX
07. PCA
PDF
Generative Adversarial Network (+Laplacian Pyramid GAN)
PPTX
Data Stream Processing with Apache Flink
PDF
Data Analysis and Visualization using Python
PDF
Integrating PostgreSql with RabbitMQ
PDF
Turbogears Presentation
 
PDF
XGBoost: the algorithm that wins every competition
PDF
Java practical(baca sem v)
PDF
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
PDF
Retrieval Augmented Generation A Complete Guide.pdf
PDF
Mapreduce by examples
PPTX
XGBoost (System Overview)
PDF
[오픈소스컨설팅]Java Performance Tuning
PPTX
Graph Databases at Netflix
PDF
Recent Trends in Deep Learning
PDF
Regular Expressions Cheat Sheet
PPTX
JSON: The Basics
PDF
Json tutorial

More Related Content

PPTX
Apache doris (incubating) introduction
PDF
Introduction to XGBoost
PPTX
ELK Stack
PDF
A Brief History of Object Detection / Tommi Kerola
PPTX
Graph Neural Network (한국어)
PDF
IBM Watson Question-Answering System and Cognitive Computing
PDF
Model selection and tuning at scale
Apache doris (incubating) introduction
Introduction to XGBoost
ELK Stack
A Brief History of Object Detection / Tommi Kerola
Graph Neural Network (한국어)
IBM Watson Question-Answering System and Cognitive Computing
Model selection and tuning at scale

What's hot

PDF
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
PPTX
K nearest neighbor
PDF
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
PDF
Xgboost
PPTX
07. PCA
PDF
Generative Adversarial Network (+Laplacian Pyramid GAN)
PPTX
Data Stream Processing with Apache Flink
PDF
Data Analysis and Visualization using Python
PDF
Integrating PostgreSql with RabbitMQ
PDF
Turbogears Presentation
 
PDF
XGBoost: the algorithm that wins every competition
PDF
Java practical(baca sem v)
PDF
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
PDF
Retrieval Augmented Generation A Complete Guide.pdf
PDF
Mapreduce by examples
PPTX
XGBoost (System Overview)
PDF
[오픈소스컨설팅]Java Performance Tuning
PPTX
Graph Databases at Netflix
PDF
Recent Trends in Deep Learning
PDF
Regular Expressions Cheat Sheet
Building a Real-Time Analytics Application with Apache Pulsar and Apache Pinot
K nearest neighbor
Introduction to Apache ZooKeeper | Big Data Hadoop Spark Tutorial | CloudxLab
Xgboost
07. PCA
Generative Adversarial Network (+Laplacian Pyramid GAN)
Data Stream Processing with Apache Flink
Data Analysis and Visualization using Python
Integrating PostgreSql with RabbitMQ
Turbogears Presentation
 
XGBoost: the algorithm that wins every competition
Java practical(baca sem v)
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
Retrieval Augmented Generation A Complete Guide.pdf
Mapreduce by examples
XGBoost (System Overview)
[오픈소스컨설팅]Java Performance Tuning
Graph Databases at Netflix
Recent Trends in Deep Learning
Regular Expressions Cheat Sheet

Viewers also liked

PPTX
JSON: The Basics
PDF
Json tutorial
PPTX
JSON and REST
PPT
JSON - Quick Overview
PDF
Introduction to JSON
PPTX
PPTX
REST & RESTful Web Services
PDF
Intoduction to php restful web service
PPTX
REST & RESTful Web Service
PPT
Understanding REST
PPTX
Design Beautiful REST + JSON APIs
PDF
RESTful web
PDF
Introduction to RESTful Webservice
PDF
C++ L02-Conversion+enum+Operators
PPTX
Java script
KEY
Inside jQuery (2011)
PPT
Ppt Wordpress
ODP
Json Tutorial
PPTX
Android json parser tutorial – example
PDF
Fundamental JQuery
JSON: The Basics
Json tutorial
JSON and REST
JSON - Quick Overview
Introduction to JSON
REST & RESTful Web Services
Intoduction to php restful web service
REST & RESTful Web Service
Understanding REST
Design Beautiful REST + JSON APIs
RESTful web
Introduction to RESTful Webservice
C++ L02-Conversion+enum+Operators
Java script
Inside jQuery (2011)
Ppt Wordpress
Json Tutorial
Android json parser tutorial – example
Fundamental JQuery

Similar to Java Script Object Notation (JSON)

PPTX
JSON - (English)
PPT
JavaScript Object Notation (JSON)
PPTX
Json training
PPTX
JSON
PPTX
All about XML, JSON and related topics..
PPTX
json.pptx
PPTX
LU 1.3. JSON & XML.pptx about how they work and introduction
PDF
Intro to JSON
PPTX
Unit-2.pptx
PDF
Json
 
PPT
json.ppt download for free for college project
PPT
J s-o-n-120219575328402-3
PPTX
1 Json Intro and datatype PRESENTATION.pptx
PPTX
JSON.pptx
PDF
Basics of JSON (JavaScript Object Notation) with examples
PPTX
Intro to JSON
JSON - (English)
JavaScript Object Notation (JSON)
Json training
JSON
All about XML, JSON and related topics..
json.pptx
LU 1.3. JSON & XML.pptx about how they work and introduction
Intro to JSON
Unit-2.pptx
Json
 
json.ppt download for free for college project
J s-o-n-120219575328402-3
1 Json Intro and datatype PRESENTATION.pptx
JSON.pptx
Basics of JSON (JavaScript Object Notation) with examples
Intro to JSON

Recently uploaded

PPTX
From Backup to Resilience: How MSPs Are Preparing for 2026
 
PDF
Day 3 - Data and Application Security - 2nd Sight Lab Cloud Security Class
PPTX
Software Analysis &Design ethiopia chap-2.pptx
PPTX
Protecting Data in an AI Driven World - Cybersecurity in 2026
PDF
TrustArc Webinar - Looking Ahead: The 2026 Privacy Landscape
PDF
December Patch Tuesday
 
PPTX
Data Privacy and Protection: Safeguarding Information in a Connected World
PDF
Vibe Coding vs. Spec-Driven Development [Free Meetup]
PDF
Day 2 - Network Security ~ 2nd Sight Lab ~ Cloud Security Class ~ 2020
PDF
Usage Control for Process Discovery through a Trusted Execution Environment
PDF
Day 1 - Cloud Security Strategy and Planning ~ 2nd Sight Lab ~ Cloud Security...
PDF
Security Forum Sessions from Houston 2025 Event
PDF
Dev Dives: AI that builds with you - UiPath Autopilot for effortless RPA & AP...
PDF
Unlocking the Power of Salesforce Architecture: Frameworks for Effective Solu...
PPTX
DYNAMICALLY.pptx good for the teachers or students to do seminars and for tea...
PDF
Energy Storage Landscape Clean Energy Ministerial
PPTX
Chapter 3 Introduction to number system.pptx
PDF
GPUS and How to Program Them by Manya Bansal
PPTX
Unit-4-ARTIFICIAL NEURAL NETWORKS.pptx ANN ppt Artificial neural network
PPTX
Building Cyber Resilience for 2026: Best Practices for a Secure, AI-Driven Bu...
From Backup to Resilience: How MSPs Are Preparing for 2026
 
Day 3 - Data and Application Security - 2nd Sight Lab Cloud Security Class
Software Analysis &Design ethiopia chap-2.pptx
Protecting Data in an AI Driven World - Cybersecurity in 2026
TrustArc Webinar - Looking Ahead: The 2026 Privacy Landscape
December Patch Tuesday
 
Data Privacy and Protection: Safeguarding Information in a Connected World
Vibe Coding vs. Spec-Driven Development [Free Meetup]
Day 2 - Network Security ~ 2nd Sight Lab ~ Cloud Security Class ~ 2020
Usage Control for Process Discovery through a Trusted Execution Environment
Day 1 - Cloud Security Strategy and Planning ~ 2nd Sight Lab ~ Cloud Security...
Security Forum Sessions from Houston 2025 Event
Dev Dives: AI that builds with you - UiPath Autopilot for effortless RPA & AP...
Unlocking the Power of Salesforce Architecture: Frameworks for Effective Solu...
DYNAMICALLY.pptx good for the teachers or students to do seminars and for tea...
Energy Storage Landscape Clean Energy Ministerial
Chapter 3 Introduction to number system.pptx
GPUS and How to Program Them by Manya Bansal
Unit-4-ARTIFICIAL NEURAL NETWORKS.pptx ANN ppt Artificial neural network
Building Cyber Resilience for 2026: Best Practices for a Secure, AI-Driven Bu...

Java Script Object Notation (JSON)

  • 1.
    JavaScript Object Notation(JSON) Compiled by Adnan Sohail Software Engineer i2c inc.
  • 2.
    JSON JSON(JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language, Standard ECMA-262 3rd Edition - December 1999. JSON is a text format that is completely language independent. These properties make JSON an ideal data-interchange language.
  • 3.
    Why JSON? BecauseJSON is lightweight, easy to understand, manipulate and generate, it has almost replaced XML which was used previously as the only data-interchange format. JSON is preferable because of the following reasons: XML is heavier than JSON to parse XML, we have to use xPath which is an overhead removed in JSON because JSON is native to JavaScript XML uses tags to describe user data and tags increase the size of data
  • 4.
    JSON Structures JSONis built on two structures: A collection of name/value pairs. In various languages, this is realized as an object , record, dictionary, hash table, keyed list, or associative array. An ordered list of values. In most languages, this is realized as an array , vector, list, or sequence.
  • 5.
    Syntax of JSONObject An object is an unordered set of name/value pairs. An object begins with {  (left brace) and ends with }  (right brace) . Each name is followed by :  (colon) and the name/value pairs are separated by ,  (comma) .
  • 6.
    Syntax of JSONArray An array is an ordered collection of values. An array begins with [  (left bracket) and ends with ]  (right bracket) . Values are separated by ,  (comma) .
  • 7.
    Syntax of JSONA value can be a string in double quotes, or a number , or true or false or null, or an object or an array . These structures can be nested. A string is a collection of zero or more Unicode characters, wrapped in double quotes, using backslash escapes. A character is represented as a single character string. A string is very much like a C or Java string.
  • 8.
    JSON Example {“students” : [ {“id&quot;:1, &quot;name&quot;:&quot;Adnan Sohail&quot;}, {“id&quot;:2, &quot;name&quot;:&quot;Irfan Razzaq&quot;} ] }
  • 9.
    XML Example <?xmlversion=&quot;1.0&quot; ?> <root> <student> <id>1</id> <name>Adnan Sohail</name> </student> <student> <id>2</id> <name>Irfan Razzaq</name> </student> </root>
  • 10.
    Validating JSON &JSON Security JavaScript’s built-in method eval() is used to validate a JSON string. Note: Use eval() only when the source is authentic and trusted which means use it only if you are sure that the string passed to it is a valid JSON string When you’ve security risks use var myObject = myJSONtext.parseJSON(); Which is available in http://www.json.org/json.js but eval() is faster than parseJSON()
  • 11.
    Using JSON APIsJSON strings can be easily generated using JSON APIs available at http://json.org There are two main classes available in org.json.* package org.json.JSONObject org.json.JSONArray Strings can be generating from objects of JSONObject or JSONArray using their toString() methods
  • 12.
    Benefits of JSONover XML JSON supports data types like string, integer, boolean etc. JSON is native data format for JavaScript and therefore it faster for the browser to read and understand. As JSON contains no tags but data and therefore less data to be transferred between client and the server. So, it’s lighter than XML. Easy for humans to read and write.
  • 13.
    JSON References http://www.xul.fr/en-xml-ajax.htmlhttp://www.xul.fr/ajax-javascript-json.html http://json.org/ http://www.json.org/java/

[8]ページ先頭

©2009-2025 Movatter.jp