Download presentation
Presentation is loading. Please wait.
Published byAudrey Spencer Modified over 6 years ago
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
{ "firstName":"John" , "lastName":"Doe" }
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" } ] }
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.