JSON Explained: A Common Format for Exchanging Website Data
What is the JSON data that an API sends? JSON is a text format used to represent and exchange structured data.
1:47 · No narration: the video shows each step as text on screen, and every step is written out below, with buttons that jump the video to it.
Prefer YouTube? Watch this video on our YouTube channel (opens in a new tab).
The six points in the video
This is a silent video. The headings, explanations and labels below reproduce the information on screen.
-
Step 1: It represents data
JSON can describe information that another system needs to read.
On-screen labels: Data exchange; Text representation; Structured values.
-
Step 2: Objects use named properties
An object groups values under string property names.
On-screen labels: Named property; Associated value; Related information.
-
Step 3: Arrays hold ordered values
An array represents a sequence of entries.
On-screen labels: Ordered sequence; Several entries; Related values.
-
Step 4: Values have defined types
Strings, numbers, booleans and null are among the supported values.
On-screen labels: Text or number; True or false; Null value.
-
Step 5: Syntax rules still apply
JSON uses double-quoted property names and does not allow trailing commas.
On-screen labels: Quoted property names; Correct separators; Valid syntax.
-
Step 6: Valid syntax is one check
The receiving system also needs the expected fields and suitable values.
On-screen labels: Expected structure; Required information; Appropriate values.
A practical check for your business
Check the expected fields and data types in an example payload. A file that parses as JSON still needs validation against the information and structure the receiving application actually accepts.
Sources and further detail
Common questions
What is the JSON data that an API sends?
JSON is a text format used to represent and exchange structured data. Check valid syntax and whether the data matches the expected structure.
Go further
More video tips
All 205 videos →
HTTP Headers Explained: Information Sent Alongside Website Requests and Responses
HTTP headers, explained.
CORS Explained: Browser Rules for Reading Responses from Another Origin
CORS, explained.