Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JSON Crash Course

lvandeyar
March 03, 2015

JSON Crash Course

A talk I gave to my co-workers about JSON on March 3rd, 2015.

lvandeyar

March 03, 2015
Tweet

More Decks by lvandeyar

Other Decks in Technology

Transcript

  1. What is JSON?  JSON stands for JavaScript Object Notation

     JSON is language independent *  JSON is a lightweight data-interchange format
  2. 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"}
  3. 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"} ]}
  4. 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