JSON Tutorial

2 min read

JavaScript Object Notation, or JSON, is a lightweight, human-readable data format that has become extremely common for web services, APIs, and many programming languages — including Python — to exchange data. JSON is also part of the material covered on the CCNA 200-301 exam, since it shows up constantly when working with network automation and REST APIs.

JSON Syntax

A few basic rules govern how JSON is structured:

  • Curly braces {} enclose an object; square brackets [] enclose an array.
  • Data is organized as key/value pairs.
  • Each key must be a string written in double quotes, followed by a colon, and then its value — for example, "name":"John".
  • Keys within the same object must be unique.
  • A value can be a string, a number, an object, an array, a boolean, or null.
  • When an object has more than one key/value pair, the pairs are separated by commas.

Example: an Array Inside an Object

{
"name":"John",
"age":30,
"cars":[ "Ford", "BMW", "Fiat"]
}

Here, the key “cars” is assigned an array containing three string values rather than a single value.

// members only

The rest of this article is for members

The full walkthrough, configuration examples and verification steps are available exclusively to paid members.

View membership plans Log in