Data & spreadsheets · course 41 of 105
JSON and CSV Exports by the RFC Rules
Read the two formats data arrives in by the rules: what makes a JSON text invalid, what sits at a path in a nested document, and how quotes, commas and line breaks split a CSV.
Not on sale yet. When sales open: $4.99 for this course, paid once, or every course for $9.99 a month. Prices
Preview
What it teaches
How to read the two plain-text formats data usually arrives in, by the rules instead of by luck. Is this text valid JSON, and if not, what is the one thing wrong (single quotes, a comma after the last item, a name without quotes, a comment, NaN, a number with a leading zero, True instead of true, two values in a row, or an apostrophe that turns out to be fine)? What value, how many items or members, and what type sit at a path like order.items[2].sku in a nested document (positions count from 0; "3" is a string and 3 is a number)? And CSV: how many fields or records a text has when quotes, commas, empty fields and line breaks are involved, what a quoted field really contains, how to write a field that holds a comma or a double quote, and how a short JSON list becomes CSV lines. The AI asks 3 questions, places you, shows a short card per module, then gives you one question at a time.
Not a Python, pandas or Excel course, and it can’t judge whether your own file will open anywhere.
How long
46 items. About 25 to 70 rounds, plus a 12-item final: 1-3 sessions. That is an estimate from a simulation of the tutor’s rules (26 rounds for a beginner who misses only the intake question, about 52 for one who misses a third of the first-time questions; a confident student places out after 12) and from a test run with simulated students (66 rounds for a beginner with 22 misses), not timed with a real student. The tutor gives a one-line save code at the end of each session.
The modules
4 modules, drilled one item at a time.
- M0
Words and rules
The rules behind both formats: JSON values, strings and words, object names, CSV records, fields and quotes
- M1
Valid JSON or not
Is this text valid JSON? If not, name the one thing wrong
- M2
Reading nested JSON
Read the value, the item count or the type at a path like order.items[2].sku
- M3
CSV
Count CSV fields and records, read a quoted field, write a field with a comma or a quote, turn a JSON list into CSV lines
Before it teaches, it asks
- 1What do you mostly get data as (JSON from an API or app, CSV from a spreadsheet or database, both), and what opens it for you (Excel, Python, a dashboard tool, nothing yet)?
- 2Is this valid JSON under RFC 8259? If not, name the one thing wrong.["red", "green", "blue",]
- 3What value sits at grid[1][2]? The JSON:{"grid": [[10, 20, 30], [40, 50, 60]], "labels": ["x", "y"]}
What’s exact, and what isn’t
Show
Straight from the course’s own notes.
- Rules quoted from four RFCs, read 2026-10-13
- RFC means “Request for Comments”, the series these documents belong to. RFC 8259 (JSON, December 2017), RFC 4180 (CSV, October 2005), RFC 2119 (what MUST and SHOULD mean, March 1997) and RFC 6901 (JSON Pointer, April 2013; used only for “positions count from 0”). A script checks every quote word for word on saved copies of the pages and fails if a page or a quote changes; it does not re-fetch the live pages. The M0 Answers are built from those quotes; they are not computed.
- Every M1, M2 and M3 Key is checked or computed by script, each by two independent readers
- M1: Python’s json module (refusing NaN and Infinity, which it accepts unless told not to) and a parser written from RFC 8259's grammar must agree on all 12 texts, and every “Not valid” text must become valid when exactly the named problem is fixed. M2: Python parses the document, the path is walked step by step, and the grammar parser must read the same data. M3: Python’s csv module (strict) and a reader written from RFC 4180's grammar must read every text the same way, and every CSV line a key shows is made by csv.writer and by a hand encoder of RFC 4180's quoting rules that must agree. All 30 wrong-answer rows are proven wrong, and the fact each one rests on is checked (what Python prints or reads, what the shifted path or the extra count gives, what a reader makes of the wrong spelling).
- One-off cross-check with other tools
- Node v25.9.0's JSON.parse on all 12 M1 texts, jq on all 12 M2 paths and sqlite3's CSV importer on five of the CSV questions agree with the keys.
- The course's own conventions, said so on the cards
- The path shorthand (a.b[2]) and the flattening rule (a header of the names in the order they first appear, one line per object, an empty field where an object lacks a name). Neither is in an RFC.
- Honest limits
- RFC 4180 itself says it “does not specify an Internet standard of any kind” and describes the format “that seems to be followed by most implementations”, so real CSV exports vary (other separators, other quoting, other line endings); the course drills the RFC’s rules. “Valid JSON” here means “follows RFC 8259's grammar”; a program may accept more, because the RFC lets a parser accept extensions (Python 3.14.3's json.loads reads NaN by default). Small texts only; CSV texts are plain ASCII, as the RFC’s grammar writes them.
- Not in it yet
- Duplicate names inside one object as a drill (M0 has the rule), \u escapes, very large or very precise numbers, byte order marks and encodings, JSON Schema, JSONPath and jq, JSON Lines, CSV with semicolons or tabs, nested JSON flattened into columns, dates, and anything in pandas or Excel.