SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
An Introduction to JSON
                             Ahmed Muzammil | @ahmedmzl
JavaScript Object Notation
                                     www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
What's inside
                     Introducing JSON
                         Why JSON
                      JSON Structures
                       Data in JSON
                   JSON Arrays, Objects
                JSON Values, String, Number
                    Tools for Developers
                    JSON Data Example




                                          www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JavaScript Object Notation

The fat free alternative to XML




                                  www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
Why JSON ??

• It's easy for humans to read and write

• It's also easy for computers to read and parse

• JSON's structure is significantly simple.

• Parsing efficiency is more when compared to XML

• Lighter and faster than XML as on-the-wire data format



                                             www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JSON objects are "typed" vs. XML is "typeless"


        XML                         JSON


         All
       Strings                                            boolean

                           string          array

                                number



                                           www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JSON   JavaScript Object Notation

                www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JSON ➡ Native data form for JavaScript

 • Data is readily accessible   • XML data needs parsing
   as JSON objects
                                • Needs to use tedious
 • Retrieving values from         DOM APIs and
   JSON is as easy as             processing power to
   importing an object in         assign to variables
   JavaScript




                                            www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JSON is built on two structures

• A collection of name/value pairs
   • Realization (as in various programming languages)
       • Object, Record, Struct, Dictionary, HashTable, Keyed
         List, or Associative Array

• An ordered list of values. In most languages, this is realized
  as an array, vector, list, or sequence.
   • Realization (as in various programming languages
       • array, vector, list, or sequence

• JSON follows universal data structures
   • It is interoperable between programming languages

                                                www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
Data Storage In JSON

• Object




• Array




                       www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JSON :: Object




• Example

 var myJSONObject =   { “Fruits” :
                                     [
                                     “Apple” ,
                                     “Orange”,
                                     “Grapes”
                                     ],
                      };


                                          www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JSON :: Array




• Example

 var myJSONArray = [
                    “Apple” ,
                    “Orange”,
                    “Grapes”
                   ];

                                www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JSON Values




              www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JSON String

 • A string is very much like a C or Java string.
     • string is a collection of zero or more Unicode characters within double
       quotes and using backslash escapes
     • character is represented as a single character string




Eg.
“Ahmed Muzammil”
“”Jamal””
“nTest”
“uAF34u34DS”

                                                          www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JSON Number

• A number is very much like a C or Java number
  ! octal and hexadecimal formats are not used.




Eg.
1234567
1.32432
0.342 e+12
1.23324342 e-32

                                        www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JSON Tools for Developers

• Available for download @ www.json.org

• Parser
  Parse JSON text files and convert these to a Java model

• Renderer
  Render a Java representation into text

• Serializer
  Serialize plain POJO clusters to a JSON representation

• Validator
  Validate the contents of a JSON file using a JSON schema

• Tools are also available for other languages
    • ASP, ActionScript, C Family, ColdFusion, Delphi, JavaScript, Perl, PHP,
       PL/SQL, Ruby, Symbian & many more

                                                               www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
Where is JSON Used?

• Ajax applications / Web 2.0

• Represent configuration information

• Implement communication protocols

• Data Exchange

• Remote Procedure Call / RMI

• Service Oriented Architecture

                                       www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
Let’s end with an example JSON
 {   "firstName": "John",
     "lastName": "Smith",
     "age": 25,
     "address":    {
            "streetAddress": "21 2nd Street",
            "city": "New York",
            "state": "NY",
            "postalCode": "10021“
            },
     "phoneNumber": [
                {
                "type": "home",
                "number": "212 555-1234“
                },
                {
                "type": "fax",
                "number": "646 555-4567“
                }
            ]
 }


                                                www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
The same Example in XML

 <Object>
 <Property><Key>firstName</Key> <String>John</String></Property>
 <Property><Key>lastName</Key> <String>Smith</String></Property>
 <Property><Key>age</Key> <Number>25</Number></Property>
 <Property><Key>address</Key> <Object> <Property><Key>streetAddress</Key>
 <String>21 2nd Street</String></Property>
 <Property><Key>city</Key> <String>New York</String></Property>
 <Property><Key>state</Key> <String>NY</String></Property>
 <Property><Key>postalCode</Key> <String>10021</String></Property>
 </Object>
 </Property> <Property><Key>phoneNumber</Key>
 <Array> <Object> <Property><Key>type</Key> <String>home</String></Property>
 <Property><Key>number</Key> <String>212 555-1234</String></Property></Object>
 <Object>
 <Property><Key>type</Key> <String>fax</String></Property> <Property><Key>number</
 Key> <String>646 555-4567</String></Property> </Object> </Array>
 </Property>
 </Object>


                                                             www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
Want more of JSON ? Go here...

• Introducing JSON
  - http://www.json.org/

• Introduction to JSON
  - http://www.javapassion.com/ajax/JSON.pdf

• JSON in JavaScript
  - http://www.json.org/js.html

• JSON in Java
  - http://www.json.org/java/index.html

                                          www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
JSON is GOOD !

• Like this presentation? Share it...

• Questions?
  - Tweet me @ahmedmzl

• I can help you on:                        Buy a "I ♥ JSON Tshirt" like this here at zazzle.com



    • Service Oriented Architecture (SOA)
    • Business Process Management (BPM)
    • Business Intelligence (BI)
    • User Experience (UX)
    • Product Development
    • Project Management

                                                   www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl

Weitere ähnliche Inhalte

Was ist angesagt?

JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)
Raghu nath
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
rfischer20
 
Building web applications with mongo db presentation
Building web applications with mongo db presentationBuilding web applications with mongo db presentation
Building web applications with mongo db presentation
Murat Çakal
 
Modeling Data in MongoDB
Modeling Data in MongoDBModeling Data in MongoDB
Modeling Data in MongoDB
lehresman
 

Was ist angesagt? (20)

JSON-(JavaScript Object Notation)
JSON-(JavaScript Object Notation)JSON-(JavaScript Object Notation)
JSON-(JavaScript Object Notation)
 
Json
JsonJson
Json
 
JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)JSON(JavaScript Object Notation)
JSON(JavaScript Object Notation)
 
Json
JsonJson
Json
 
Json tutorial, a beguiner guide
Json tutorial, a beguiner guideJson tutorial, a beguiner guide
Json tutorial, a beguiner guide
 
Hands on JSON
Hands on JSONHands on JSON
Hands on JSON
 
Json
JsonJson
Json
 
ActiveRecord vs Mongoid
ActiveRecord vs MongoidActiveRecord vs Mongoid
ActiveRecord vs Mongoid
 
Json
JsonJson
Json
 
Using Mongoid with Ruby on Rails
Using Mongoid with Ruby on RailsUsing Mongoid with Ruby on Rails
Using Mongoid with Ruby on Rails
 
MongoDB and Ruby on Rails
MongoDB and Ruby on RailsMongoDB and Ruby on Rails
MongoDB and Ruby on Rails
 
Json - ideal for data interchange
Json - ideal for data interchangeJson - ideal for data interchange
Json - ideal for data interchange
 
Schema Design with MongoDB
Schema Design with MongoDBSchema Design with MongoDB
Schema Design with MongoDB
 
J s-o-n-120219575328402-3
J s-o-n-120219575328402-3J s-o-n-120219575328402-3
J s-o-n-120219575328402-3
 
Json
JsonJson
Json
 
Building web applications with mongo db presentation
Building web applications with mongo db presentationBuilding web applications with mongo db presentation
Building web applications with mongo db presentation
 
Json
JsonJson
Json
 
Comparing JSON Libraries - July 19 2011
Comparing JSON Libraries - July 19 2011Comparing JSON Libraries - July 19 2011
Comparing JSON Libraries - July 19 2011
 
Modeling Data in MongoDB
Modeling Data in MongoDBModeling Data in MongoDB
Modeling Data in MongoDB
 
java script json
java script jsonjava script json
java script json
 

Ähnlich wie An Introduction to JSON JavaScript Object Notation

json.ppt download for free for college project
json.ppt download for free for college projectjson.ppt download for free for college project
json.ppt download for free for college project
AmitSharma397241
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
kriszyp
 

Ähnlich wie An Introduction to JSON JavaScript Object Notation (20)

Json
JsonJson
Json
 
3 web services bb
3   web services bb3   web services bb
3 web services bb
 
Java script and json
Java script and jsonJava script and json
Java script and json
 
AJAX, JSON, and Client-Side Templates
AJAX, JSON, and Client-Side TemplatesAJAX, JSON, and Client-Side Templates
AJAX, JSON, and Client-Side Templates
 
json.ppt download for free for college project
json.ppt download for free for college projectjson.ppt download for free for college project
json.ppt download for free for college project
 
Mongodb
MongodbMongodb
Mongodb
 
Web technologies-course 10.pptx
Web technologies-course 10.pptxWeb technologies-course 10.pptx
Web technologies-course 10.pptx
 
Ajax
Ajax Ajax
Ajax
 
PhDigital 2020: Web Development
PhDigital 2020: Web DevelopmentPhDigital 2020: Web Development
PhDigital 2020: Web Development
 
Neotys conference
Neotys conferenceNeotys conference
Neotys conference
 
JSON
JSONJSON
JSON
 
Introducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No ProblemIntroducing Azure DocumentDB - NoSQL, No Problem
Introducing Azure DocumentDB - NoSQL, No Problem
 
Json training
Json trainingJson training
Json training
 
Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2Java Script Based Client Server Webapps 2
Java Script Based Client Server Webapps 2
 
BITM3730Week8.pptx
BITM3730Week8.pptxBITM3730Week8.pptx
BITM3730Week8.pptx
 
Json the-x-in-ajax1588
Json the-x-in-ajax1588Json the-x-in-ajax1588
Json the-x-in-ajax1588
 
How to use Schema to enrich search results and improve your CTR - Andrew Mart...
How to use Schema to enrich search results and improve your CTR - Andrew Mart...How to use Schema to enrich search results and improve your CTR - Andrew Mart...
How to use Schema to enrich search results and improve your CTR - Andrew Mart...
 
Service Oriented Architecture -Unit II - Modeling databases in xml
Service Oriented Architecture -Unit II - Modeling databases in xml Service Oriented Architecture -Unit II - Modeling databases in xml
Service Oriented Architecture -Unit II - Modeling databases in xml
 
JSON - (English)
JSON - (English)JSON - (English)
JSON - (English)
 
NAVTechDays 2017 Json Meets NAV
NAVTechDays 2017 Json Meets NAVNAVTechDays 2017 Json Meets NAV
NAVTechDays 2017 Json Meets NAV
 

Mehr von Ahmed Muzammil

Mehr von Ahmed Muzammil (8)

Islam on respecting others
Islam on respecting othersIslam on respecting others
Islam on respecting others
 
Children upbringing in Islam, Tiger and Panda Parenting
Children upbringing in Islam, Tiger and Panda ParentingChildren upbringing in Islam, Tiger and Panda Parenting
Children upbringing in Islam, Tiger and Panda Parenting
 
What Islam Teaches You About Healthy Food - Healthy Foods and Myths
What Islam Teaches You About Healthy Food - Healthy Foods and MythsWhat Islam Teaches You About Healthy Food - Healthy Foods and Myths
What Islam Teaches You About Healthy Food - Healthy Foods and Myths
 
Jaspersoft Reporting v5
Jaspersoft Reporting v5Jaspersoft Reporting v5
Jaspersoft Reporting v5
 
XML Security Using XSLT
XML Security Using XSLTXML Security Using XSLT
XML Security Using XSLT
 
Element wise encryption of XML using XSLT
Element wise encryption of XML using XSLTElement wise encryption of XML using XSLT
Element wise encryption of XML using XSLT
 
Virus detection based on virus throttle technology
Virus detection based on virus throttle technologyVirus detection based on virus throttle technology
Virus detection based on virus throttle technology
 
Virus detection based on virus throttle technology
Virus detection based on virus throttle technologyVirus detection based on virus throttle technology
Virus detection based on virus throttle technology
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

An Introduction to JSON JavaScript Object Notation

  • 1. An Introduction to JSON Ahmed Muzammil | @ahmedmzl JavaScript Object Notation www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 2. What's inside Introducing JSON Why JSON JSON Structures Data in JSON JSON Arrays, Objects JSON Values, String, Number Tools for Developers JSON Data Example www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 3. JavaScript Object Notation The fat free alternative to XML www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 4. Why JSON ?? • It's easy for humans to read and write • It's also easy for computers to read and parse • JSON's structure is significantly simple. • Parsing efficiency is more when compared to XML • Lighter and faster than XML as on-the-wire data format www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 5. JSON objects are "typed" vs. XML is "typeless" XML JSON All Strings boolean string array number www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 6. JSON JavaScript Object Notation www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 7. JSON ➡ Native data form for JavaScript • Data is readily accessible • XML data needs parsing as JSON objects • Needs to use tedious • Retrieving values from DOM APIs and JSON is as easy as processing power to importing an object in assign to variables JavaScript www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 8. JSON is built on two structures • A collection of name/value pairs • Realization (as in various programming languages) • Object, Record, Struct, Dictionary, HashTable, Keyed List, or Associative Array • An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence. • Realization (as in various programming languages • array, vector, list, or sequence • JSON follows universal data structures • It is interoperable between programming languages www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 9. Data Storage In JSON • Object • Array www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 10. JSON :: Object • Example var myJSONObject = { “Fruits” : [ “Apple” , “Orange”, “Grapes” ], }; www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 11. JSON :: Array • Example var myJSONArray = [ “Apple” , “Orange”, “Grapes” ]; www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 12. JSON Values www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 13. JSON String • A string is very much like a C or Java string. • string is a collection of zero or more Unicode characters within double quotes and using backslash escapes • character is represented as a single character string Eg. “Ahmed Muzammil” “”Jamal”” “nTest” “uAF34u34DS” www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 14. JSON Number • A number is very much like a C or Java number ! octal and hexadecimal formats are not used. Eg. 1234567 1.32432 0.342 e+12 1.23324342 e-32 www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 15. JSON Tools for Developers • Available for download @ www.json.org • Parser Parse JSON text files and convert these to a Java model • Renderer Render a Java representation into text • Serializer Serialize plain POJO clusters to a JSON representation • Validator Validate the contents of a JSON file using a JSON schema • Tools are also available for other languages • ASP, ActionScript, C Family, ColdFusion, Delphi, JavaScript, Perl, PHP, PL/SQL, Ruby, Symbian & many more www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 16. Where is JSON Used? • Ajax applications / Web 2.0 • Represent configuration information • Implement communication protocols • Data Exchange • Remote Procedure Call / RMI • Service Oriented Architecture www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 17. Let’s end with an example JSON { "firstName": "John", "lastName": "Smith", "age": 25, "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021“ }, "phoneNumber": [ { "type": "home", "number": "212 555-1234“ }, { "type": "fax", "number": "646 555-4567“ } ] } www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 18. The same Example in XML <Object> <Property><Key>firstName</Key> <String>John</String></Property> <Property><Key>lastName</Key> <String>Smith</String></Property> <Property><Key>age</Key> <Number>25</Number></Property> <Property><Key>address</Key> <Object> <Property><Key>streetAddress</Key> <String>21 2nd Street</String></Property> <Property><Key>city</Key> <String>New York</String></Property> <Property><Key>state</Key> <String>NY</String></Property> <Property><Key>postalCode</Key> <String>10021</String></Property> </Object> </Property> <Property><Key>phoneNumber</Key> <Array> <Object> <Property><Key>type</Key> <String>home</String></Property> <Property><Key>number</Key> <String>212 555-1234</String></Property></Object> <Object> <Property><Key>type</Key> <String>fax</String></Property> <Property><Key>number</ Key> <String>646 555-4567</String></Property> </Object> </Array> </Property> </Object> www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 19. Want more of JSON ? Go here... • Introducing JSON - http://www.json.org/ • Introduction to JSON - http://www.javapassion.com/ajax/JSON.pdf • JSON in JavaScript - http://www.json.org/js.html • JSON in Java - http://www.json.org/java/index.html www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl
  • 20. JSON is GOOD ! • Like this presentation? Share it... • Questions? - Tweet me @ahmedmzl • I can help you on: Buy a "I ♥ JSON Tshirt" like this here at zazzle.com • Service Oriented Architecture (SOA) • Business Process Management (BPM) • Business Intelligence (BI) • User Experience (UX) • Product Development • Project Management www.ahmedmzl.com | Ahmed Muzammil Jamal ] LinkedIn ] @ahmedmzl