Option D applies a fundamental production engineering principle: treat externally generated data as potentially malformed and parse it defensively before use. Downstream application logic should not assume that every field exists, every type is correct, or every unexpected property can safely be ignored. Instead, the parser should validate expected structures, handle optional or missing values deliberately, reject incompatible types, and convert failures into controlled application errors rather than process crashes.
Anthropic's Structured Outputs documentation identifies exactly these failure classes for unconstrained model output: malformed JSON, missing required fields, inconsistent types, and schema violations can break downstream applications. Current Structured Outputs and strict tool-use capabilities can eliminate many schema-level failures through constrained decoding, but defensive handling remains an important software boundary when unexpected data can still arise from external services, legacy paths, or semantic validation requirements.
A creates unnecessary outages. B hides failures and discards potentially recoverable data without observability. C deliberately postpones a reliability requirement until after deployment.
The supplied question identifies D as correct. Relevant topics: Claude App Design, defensive programming, structured output, schema validation, parsing, error handling, downstream reliability, and type safety.
===============