JSON Schema
A JSON-based vocabulary for describing the shape, types, and constraints of JSON documents.
Definition
JSON Schema declares the structure a JSON document must conform to: types, required fields, enums, regex patterns, and nested objects. It powers Pydantic models, OpenAPI specs, MCP tool definitions, and Anthropic and OpenAI structured-output modes. A JSON Schema doubles as both validator (reject malformed input) and contract documentation.
When to use
See also
- Pydantic — Python's de facto data-validation library — typed models that parse and validate JSON, env vars, and API payloads.
- JSON-LD — JSON for Linking Data — the JSON syntax for embedding schema.org structured data in a web page.