Structured output represents an answer in a predictable data format. JavaScript Object Notation, written JSON, uses objects with named fields, arrays, strings, numbers, booleans, and null. Python's standard library json converts between that text format and Python dictionaries, lists, and values. Parsing establishes that the text follows JSON syntax; it does not establish the expected schema.
A schema is a contract for fields and types. The invoice answer requires exactly invoice_id and total_cents. The identifier may be a string or null; the total may be an integer or null. Extra fields can be rejected to prevent hidden action instructions from being smuggled into an otherwise accepted object.
The fixture validates exact Python types. This matters because bool is related to int in Python's type system: a broad isinstance(value, int) accepts True, but a financial amount should not accept a boolean. type(value) is int requires the exact integer type. Deliberately handling this edge case teaches why a format-valid and even loosely type-valid answer can violate the actual response contract. Validation errors should be explicit rather than silently coercing unsupported values.