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.
Cheap Rate ➥8448380779 ▻Call Girls In Iffco Chowk Gurgaon
JSON
1.
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
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.