Slide 1

Slide 1 text

JSON Crash Course LAURENCE VANDEYAR, SENIOR SYSTEMS ENGINEER MARCH 3RD, 2015

Slide 2

Slide 2 text

What is JSON?  JSON stands for JavaScript Object Notation  JSON is language independent *  JSON is a lightweight data-interchange format

Slide 3

Slide 3 text

JSON Syntax JavaScript object notation syntax:  Data is in name/value pairs  "firstName":“Laurence"  Data is separated by commas  “firstName":“Laurence", "lastName":“Vandeyar"  Curly braces hold objects  {"firstName":“Laurence", "lastName":“Vandeyar"}

Slide 4

Slide 4 text

JSON Syntax (cont.)  Square brackets hold arrays  [ {"firstName":“Laurence", "lastName":“Vandeyar"}, {"firstName":“Michael", "lastName":“Pereira"}, {"firstName":“Kenneth", "lastName":“Tamsberg"} ]  Complete JSON Object Array  {"employees":[ {"firstName":“Laurence", "lastName":“Vandeyar"}, {"firstName":“Michael", "lastName":“Pereira"}, {"firstName":“Kenneth", "lastName":“Tamsberg"} ]}

Slide 5

Slide 5 text

JSON Values 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 braces)  null

Slide 6

Slide 6 text

Example

Slide 7

Slide 7 text

Links  http://json.org/  http://jsonformatter.curiousconcept.com/