Good place to stop if you're short on time — step 3 picks up here.
Lesson idea Tap to fold
What Python structure stores labelled facts about one item?
Show the answer
A dictionary: each value is reached through a named key.
JSON text is not a Python dictionary
JSON is an interchange format. json.loads reads text into Python values; json.dumps goes the other direction. An object becomes a dictionary, an array becomes a list, true/false become True/False and null becomes None. Valid JSON can also be a number or string, so decoding does not prove you got a record.
JSON property names use double quotes. Malformed text raises json.JSONDecodeError. Printing a dictionary gives Python repr, which is not a JSON export. Spaces and property order do not change the decoded facts; sort_keys=True makes exported property order stable.
# JSON text is not a Python dictionary.
import json
raw = '{"item_id":"Museum","ready":true,"notes":null}'
record = json.loads(raw)
print(record["item_id"])
print(record["ready"], record["notes"])
print(json.dumps(record, sort_keys=True))
Museum, then True None, then JSON with item_id, notes and ready in sorted order. The exported text uses null and true, not Python None and True.
Name the representation before using it: text, decoded data or serialized text. Next, apply the same boundary to one record per line.
Predict, explain, then test
These three brief checks are self-reviewed, not a scored quiz. Answer before opening the comparison. Coding checks follow the stated task assumptions on unfamiliar inputs.
Name the type
What Python values result from JSON true and null?
Compare your answer · self-reviewed
True and None. They are not the strings "true" and "null".
Spot a boundary
Does json.loads("[]") prove a record dictionary was decoded?
Compare your answer · self-reviewed
No. It produces a list; valid JSON syntax alone does not validate a record shape.
Choose serialization
Is str({"ready": True}) a JSON export?
Compare your answer · self-reviewed
No. Python repr can contain single quotes and True; use json.dumps.
Choose an exercise to load its prompt.
Loading exercises…
Noted on your route map, with the step you were on. Nothing is lost by parking it — the next review day will bring this idea back, and the flag tells the course where to slow down.
The tutor mounts here when JavaScript is available. The lesson above stays readable without it.