1 / 4

Consuming Java Script Object Notation (JSON) feeds

Consuming Java Script Object Notation (JSON) feeds. What is JSON? . JSON stands for J ava S cript  O bject  N otation is syntax for storing and exchanging text information Much like XML is smaller than XML, and faster and easier to parse.

Download Presentation

Consuming Java Script Object Notation (JSON) feeds

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Consuming Java Script Object Notation (JSON) feeds

  2. What is JSON? • JSON • stands for JavaScript Object Notation • is syntax for storing and exchanging text information • Much like XML • is smaller than XML, and faster and easier to parse {"employees": [{ "firstName":"John" , "lastName":"Doe" }, { "firstName":"Anna" , "lastName":"Smith" }, { "firstName":"Peter" , "lastName":"Jones" }]}

  3. Contrasting XML to JSON • Similarities: • both are • Plain-text • Self-describing (human readable) • Hierarchical (values nested within values) • Differences: • JSON • Uses no end tags • Is shorter • Quicker to read and write • Uses arrays

  4. JSON syntax • JSON data • written as name/value pairs • Separated by commas (,) • JSON objects • Enclosed in curly brackets ({}) • JSON arrays • Delineated by square brackets ([]) "firstName" : "John" { "firstName":"John" , "lastName":"Doe" } {"employees": [{ "firstName":"John" , "lastName":"Doe" }, { "firstName":"Anna" , "lastName":"Smith" }, { "firstName":"Peter" , "lastName":"Jones" }]}

More Related