Reading JSON
Most API replies are written in JSON, a plain text format of labelled boxes. A tester who can read it can spot a missing field, a wrong type or a null at a glance.
L1–L4 are part of the Pro pass
L0 Explain simply
Analogy: a form with labelled boxes. A paper form has a box for a name, a box for a date and a box for a list of items. Each box has a label, and each holds something. Now imagine the whole form written down as plain text, so that a program can read it.
That is . Daily List is a to-do list app. When Tom asks its for a task, the reply looks like this, made up for teaching: {"title":"Buy milk","done":false,"due":"2026-11-02"}. Each label is a field, and the label title holds the words Buy milk while the label done holds the answer false.
Tom reads the reply the way he reads a form, looking at the labels first and then at what each box holds. In the reply above, the due date is present. Tom compares it with a second reply, {"title":"Buy milk","done":false}, where due is missing. The second form has a missing box.
A member can also be present with the explicit JSON value null. This is a , not a missing value or proof that someone intentionally cleared it. A missing member and a present null member are structurally different; the API contract gives each its meaning.
The form picture has a limit. A paper form has the same boxes for everyone. A JSON text need not be a form-like object at all: its root can also be a list, string, number, boolean or null. For an object response, the contract decides which members may be omitted.
(SYNTHETIC / TRAINING ONLY: Daily List and every person named in this lesson are invented.)
PLAIN WORDS · 1 in this section
- boolean
- either true or false
PICTURE IT
The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.
THE REAL JOB Reading a reply as a form of labelled boxes, and telling a missing box from an empty one.
- Is it there?
- Is it the right kind?
- Is the value right?
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| Form with labelled boxes | JSON reply |
| One labelled box | Field |
| A box with nothing in it | Null value |
| A box left off the form | Missing field |
WHERE THIS PICTURE STOPS
- A paper form has the same boxes for everyone. A reply can leave a box out.
- A printed form is never invalid. JSON with a stray comma cannot be read.
- A person guesses what a smudged box means. A program does not guess.
HOOK
Is the box there, is it the right kind, is it right?
REMEMBER IT THIS WAY
A contrast: two neighbours told apart by one test.
A missing field is a label absent from this object-form analogy; a is explicitly present as the literal null.
| In the trick | What it stands for |
|---|---|
| Missing field | a label left off the form |
| Null value | a box with nothing in it |
TELL A FRIEND
A form with labelled boxes written down as text. A reply has labels and values, and some boxes can be empty or missing.
OFTEN MIXED UP WITH What an API is. The lesson names the menu a program orders from. This lesson reads the answer that comes back.
PRACTISE AND KEEP
Sources for this topic — 7 sources
- Market practice
The JavaScript Object Notation (JSON) Data Interchange Format (Request for Comments 8259) ↗ — Internet Engineering Task Force · JSON values are objects, arrays, numbers, strings and the literals true, false and null, which must be lowercase; an object is a set of name and value pairs whose names are strings and should be unique; an array is an ordered list (search excerpt, page not opened; source staged by the business analysis batch 13)
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. Supplement6November2026: actual RFC8259 sections2–3 opened. RFC8259 is STD90; null is a literal JSON value. Earlier excerpt notes retain their historical scope.
- Market practice
Working with JavaScript Object Notation (JSON) (Mozilla developer docs, Learn web development) ↗ — Mozilla (developer documentation) · JSON strings need double quotes, trailing commas are not allowed and comments are not allowed; JSON.parse and JSON.stringify convert between text and objects; a value is read with dot or bracket syntax (search excerpt, page not opened)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Market practice
JSONPath: query expressions for JSON (Request for Comments 9535) ↗ — IETF · JSONPath is a Proposed Standard from February 2024 that selects values inside a JSON document (search excerpt, page not opened; syntax not seen)
Original 18 October 2026 record was based on search excerpts. On 7 November 2026 the RFC Editor publication page, abstract and Status of This Memo were opened to verify Proposed Standard/Standards Track status. This taxonomy update does not certify a complete syntax, implementation or errata review; lesson-specific source locators identify separately read technical sections.
- Market practice
How to pass a null value in a web API when creating or changing data (Stainless SDK guide) ↗ — Stainless · A field set to null, an empty string and an omitted field are three different signals; tests should check each (search excerpt, page not opened; vendor guide)
Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.
- Official requirement
The JavaScript Object Notation (JSON) Data Interchange Format (Request for Comments 8259) ↗ — Internet Engineering Task Force · RFC8259/STD90,December2017:2–3 JSON grammar and values, including literal null; no built-in date type (relevant primary passages opened6November2026).
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. Supplement6November2026: actual RFC8259 sections2–3 opened. RFC8259 is STD90; null is a literal JSON value. Earlier excerpt notes retain their historical scope.
- Official requirement
The JavaScript Object Notation (JSON) Data Interchange Format (Request for Comments 8259) ↗ — Internet Engineering Task Force · RFC8259/STD90,December2017: complete sections2–7,8.1–8.2,9–10 as enumerated in V72 actually read. JSON texts can hold any JSON value; null is a value; duplicate object names SHOULD be unique and parser behavior differs; no built-in date type.
Found through a web search; the page was not opened (search excerpt, page not opened). Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail. Supplement6November2026: actual RFC8259 sections2–3 opened. RFC8259 is STD90; null is a literal JSON value. Earlier excerpt notes retain their historical scope.
- Official requirement
JSONPath: query expressions for JSON (Request for Comments 9535) ↗ — IETF · RFC9535,February2024: bounded complete query model,root/name/index/child segments and selected examples actually read in V72. Selection is distinct from modifying JSON; no all-tool or full filter/function conformance claim.
Original 18 October 2026 record was based on search excerpts. On 7 November 2026 the RFC Editor publication page, abstract and Status of This Memo were opened to verify Proposed Standard/Standards Track status. This taxonomy update does not certify a complete syntax, implementation or errata review; lesson-specific source locators identify separately read technical sections.
Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.