# When should I use Claude structured outputs instead of asking for JSON in a prompt?

Exam: CCDV-F — Claude Certified Developer - Foundations
Knowledge domain: Applications and Integration
Updated: 2026-11-25T08:30:12.353083+00:00
HTML: https://learningpathx.com/faq/CCDV-F/ccdvf-structured-output-contract.html

## Also asked as

- How do I choose between a Claude JSON response schema and strict tool inputs?
- What does Claude structured output guarantee for an application that needs machine-readable data?

Use Claude JSON outputs when downstream code needs a defined response shape. Use strict tool use when Claude proposes arguments for a registered tool. On a supported Claude API model, the first uses `output_config.format` with `type: "json_schema"` and the second sets `strict: true` on the tool. Both can be used together. Plain text is appropriate when a person reads the response and no machine-readable contract is needed. [Claude structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)

The supported schema constrains ordinary completed output. A refused or token-limited JSON response can fall outside the schema, and string enum or const values can vary in capitalization even on normal completions. That casing exception also applies to strict tool input. [Claude structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)

Design a narrow, versioned contract from the consumer's next decision. A support classifier can require a category from a closed list, source evidence references, a concise summary, and a review flag. Specify required fields, permitted values, nested types, and how null or omitted values are handled. Use field descriptions for meaning and check the API's supported JSON Schema subset. For example, some SDK helpers remove unsupported length or numeric constraints from the API schema and validate them locally, so inspect the schema and your SDK's behavior. [Claude structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)

Schema conformance establishes shape. Check that references resolve to authorized records, the evidence supports the category, and the current state permits the action. A review flag can route a draft to a person. Authorization remains an application decision. [Mitigate jailbreaks and prompt injections](https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/mitigate-jailbreaks)

Source: [Structured Claude Outputs, Validation, and Defensive Parsing](https://learningpathx.com/news/structured-claude-outputs-validation-and-defensive-parsing.html)
