Lesson 5 · The common language

REST and JSON, without the jargon

REST is a common style for organizing web APIs. JSON is a common way those APIs package data. You do not need to write JSON to understand what it is saying.

Watch data become a JSON response
Data to return
city Chicago
temperature 72°F
condition Sunny
humidity 55%
{ }JSONpackages the data
Structured JSON response
{
  "city": "Chicago",
  "temperature": "72°F",
  "condition": "Sunny",
  "humidity": "55%"
}
🛣️

REST

A widely used pattern for accessing resources over the web using familiar actions such as GET and POST.

{ }

JSON

A compact text format made of labels and values. It is easy for software to exchange and still readable by people.

🌐

HTTP

The same underlying web protocol browsers use. Many APIs travel over HTTPS, the secure version used across the modern web.

Do not let the syntax intimidate you: JSON is mostly labels and values. Once you know the labels, the response often reads like a small structured report.

Quick check

What is JSON mainly used for in an API?