- Data is in name/value pairs
- Data is separated by commas
- Curly braces hold objects
- Square brackets hold arrays
JSON data is written as name/value pairs.
A name/value pair consists of a field name in double quotes, followed by a colon, followed by a value:
"address" : "10.1.1.1"
JSON "name" : "GigabitEthernet0/0"
JSON Data Types
- string - a sequence of zero or more characters
- number - a decimal number that may contain a fractional part
- array - an ordered list of values, each of which may be of any type wrapped in square brackets.
- boolean - either of the values
Let's have a look at how each data type is used in the following example: