JSON and Data Validation
Parse and serialize JSON at trust boundaries, then validate the resulting value before use.
Lesson introduction
JSON is a text interchange format, not a guarantee of a valid application record. Parsing proves syntax only; the program must still validate types, required fields, and ranges.
Where this fits
This lesson builds one part of the path from language fundamentals to complete browser applications.
What you will build
Write a parser that distinguishes invalid JSON from a syntactically valid but invalid lesson record.
You will first study the underlying rule, then trace worked code, repair a mistake, and create an independent solution.