Lesson 1

What Is JSON?

Definition, history, and where JSON appears in modern software.

JSON stands for JavaScript Object Notation. Despite the name, JSON is a text-based data format, not a programming language. Any environment with a JSON parser can read and write it—Python, Java, Go, Rust, and countless others.

A minimal example

{
  "name": "Ada",
  "active": true,
  "score": 98.5
}

This document describes one object with three properties: a string, a boolean, and a number.

Why JSON became popular

Before JSON dominated web APIs, XML was common. JSON is usually shorter and easier for humans to scan, while still being machine-readable. It maps naturally to objects and arrays in most programming languages.

Today you will find JSON in:

  • REST and GraphQL API request and response bodies
  • Configuration files for tools, CI pipelines, and cloud services
  • NoSQL databases that store documents
  • Log and event streams structured for analysis

JSON vs JavaScript object literals

JavaScript code can look similar to JSON, but they are not the same:

FeatureJSONJavaScript object
KeysMust be double-quoted stringsCan be unquoted identifiers
Trailing commasNot allowedOften allowed
CommentsNot allowed// and /* */ allowed
Functions, undefinedNot allowedAllowed

Copying JavaScript object syntax into a JSON-only system is a frequent source of parse errors. The rest of this course explains the rules JSON enforces.

Key takeaway

JSON is a strict, portable way to represent structured data as text. Learning its rules helps you read APIs, write configs, and debug invalid payloads confidently.

When you want to practice, use the related DevCove tool — optional, not part of this lesson.

Open related tool

Back to course overview