JSON

JSON

Definition: JavaScript Object Notation

  1. First standardized in 2013 in RFC 8259
  2. Easier for humans to read and work with than XML
  3. Can be imported directly into JavaScript, which is commonly used on the internet
  4. White Space is insignificant
  5. RESTful APIs often use JSON

Extra deets:

  1. JSON is a series of keys and their values
    1. Keys are always strings
    2. Values can be one of four primitive data types
    3. Keys and Values are separated by colons :
    4. Each Key-Value Pairs is separated by commas
  2. JSON primitive Data Types
    1. String
    2. Number
    3. Boolean
    4. Null
  3. JSON structured data types
    1. Object (or Dictionary)
      1. An unordered list of key-value pairs encapsulated in curly brackets and separated by commas
    2. Array
      1. A series of values encapsulated in brackets and separated by commas
JSON Sample
"ArrayOfObjects":[
{
"name":"Object1",
"number":420,
"boolean_value":false,
"ArrayofNumbers":[420,69,3],
"Nullvalue":,
},
{
"name":"Object2",
"ipaddress":"192.168.1.1"
}
]

Metadata

OSI or TCP/IP Layer

CCNA Exam Topic

Contributors

Sources