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

More Related Content

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

What's hot

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

Viewers also liked

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

Similar to Java Script Object Notation (JSON)

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

Recently uploaded

PDF
Access Control 2025: From Security Silo to Software-Defined Ecosystem
PDF
December Patch Tuesday
 
PPTX
Conversational Agents – Building Intelligent Assistants [Virtual Hands-on Wor...
PDF
Our Digital Tribe_ Cultivating Connection and Growth in Our Slack Community 🌿...
PDF
Real-Time Data Insight Using Microsoft Forms for Business
PPTX
From Backup to Resilience: How MSPs Are Preparing for 2026
 
PPTX
Building Cyber Resilience for 2026: Best Practices for a Secure, AI-Driven Bu...
PDF
The major tech developments for 2026 by Pluralsight, a research and training ...
PDF
Cybersecurity: Safeguarding Digital Assets
PDF
Six Shifts For 2026 (And The Next Six Years)
PDF
TrustArc Webinar - Looking Ahead: The 2026 Privacy Landscape
PDF
Is It Possible to Have Wi-Fi Without an Internet Provider
PDF
Day 5 - Red Team + Blue Team in the Cloud - 2nd Sight Lab Cloud Security Class
PPTX
Protecting Data in an AI Driven World - Cybersecurity in 2026
PPTX
Chapter 3 Introduction to number system.pptx
PPTX
Cybersecurity Best Practices - Step by Step guidelines
PDF
Day 2 - Network Security ~ 2nd Sight Lab ~ Cloud Security Class ~ 2020
PDF
Eredità digitale sugli smartphone: cosa resta di noi nei dispositivi mobili
PDF
GPUS and How to Program Them by Manya Bansal
PDF
Making Sense of Raster: From Bit Depth to Better Workflows
Access Control 2025: From Security Silo to Software-Defined Ecosystem
December Patch Tuesday
 
Conversational Agents – Building Intelligent Assistants [Virtual Hands-on Wor...
Our Digital Tribe_ Cultivating Connection and Growth in Our Slack Community 🌿...
Real-Time Data Insight Using Microsoft Forms for Business
From Backup to Resilience: How MSPs Are Preparing for 2026
 
Building Cyber Resilience for 2026: Best Practices for a Secure, AI-Driven Bu...
The major tech developments for 2026 by Pluralsight, a research and training ...
Cybersecurity: Safeguarding Digital Assets
Six Shifts For 2026 (And The Next Six Years)
TrustArc Webinar - Looking Ahead: The 2026 Privacy Landscape
Is It Possible to Have Wi-Fi Without an Internet Provider
Day 5 - Red Team + Blue Team in the Cloud - 2nd Sight Lab Cloud Security Class
Protecting Data in an AI Driven World - Cybersecurity in 2026
Chapter 3 Introduction to number system.pptx
Cybersecurity Best Practices - Step by Step guidelines
Day 2 - Network Security ~ 2nd Sight Lab ~ Cloud Security Class ~ 2020
Eredità digitale sugli smartphone: cosa resta di noi nei dispositivi mobili
GPUS and How to Program Them by Manya Bansal
Making Sense of Raster: From Bit Depth to Better Workflows

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