JSON is a lightweight data-interchange format that is easy for humans to read and write and for machines to parse and generate. It is built on two structures: a collection of name/value pairs and an ordered list of values. JSON supports strings, numbers, objects, arrays, true, false and null. JavaScript is a superset of JSON and JSON can be parsed into JavaScript objects for easy use.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
21 views13 pages
Session 23
JSON is a lightweight data-interchange format that is easy for humans to read and write and for machines to parse and generate. It is built on two structures: a collection of name/value pairs and an ordered list of values. JSON supports strings, numbers, objects, arrays, true, false and null. JavaScript is a superset of JSON and JSON can be parsed into JavaScript objects for easy use.
• YAML is a superset of JSON – YAML decoder and JavaScript interpreter can be used as JSON decoder Venkat Subramaniam – [email protected] 3 What’s in JSON
Object • Objects: More of a hashmap notation – {"keyname": JSONValue, "keyname": JSONValue,…} – JSONValue may be any of the JSON value types including other objects
Arrays • Arrays – Sequence of values – [JSONValue, JSONValue, JSONValue, …] – Index is decided by implementation (like Java can use 0, VB can use 1, JSON doesn’t care) – JSONValue may be any JSON value type including objects and arrays