JSON Schema
Definition
JSON Schema is a JSON-based format for describing the structure of JSON data (media type application/schema+json).
The specification consists of the parts Core and Validation: Core defines the basics, Validation defines the validation keywords. These keywords allow requirements to be set for a JSON document, such as type ("type"), required properties ("required"), or upper and lower numeric limits ("maximum", "minimum").
Simply explained
A blueprint specifies which data fields are allowed and required; it does not check whether the entered information is factually correct.
Why it matters in practice
JSON Schema makes data structures between systems verifiable. Even with AI outputs, mandatory fields and formats can be checked before the next processing step begins.
Example from business
Possible example: An agent may only produce a JSON object with order_id, status, and confidence; the result is validated against the schema before the next workflow step.
Limits and pitfalls
- A valid structure does not guarantee factually correct values. Versions and dialects must match; without explicit required field declaration, "required" does not demand properties.
Origin & history
JSON Schema was developed over several drafts, including Draft-04, Draft-06, and Draft-07; followed by versions 2019-09 and 2020-12. The evaluated versions of Core and Validation are Internet Drafts of version 2020-12 dated 16.06.2022.
Use in mid-sized companies
- Possible application areas: describing data contracts between systems and interfaces (OpenAPI builds on JSON Schema for data types); checking configuration files for their structure; checking inputs from imports for mandatory fields before further processing.
Frequently asked questions
Is JSON Schema the same as OpenAPI?
No. In OpenAPI 3.1.0, the Schema Object is a superset of JSON Schema Draft 2020-12; OpenAPI additionally describes an interface to HTTP APIs.
Can schemas validate themselves?
Yes, via meta-schemas; the JSON Schema meta-schema validates itself.
What is the purpose of the keyword "format"?
It is an annotation that allows schema authors to provide semantic information about specific values.
Sources
- JSON Schema: A Media Type for Describing JSON Documents · Wright et al. (2022): JSON Schema: A Media Type for Describing JSON Documents
- JSON Schema Validation: A Vocabulary for Structural Validation of JSON · Wright et al. (2022): JSON Schema Validation: A Vocabulary for Structural Validation of JSON
- OpenAPI Specification v3.1.0 · OpenAPI Initiative (2021): OpenAPI Specification v3.1.0
- JSON Schema - Specification · JSON Schema (o. J.): JSON Schema - Specification
Sources checked on 14.10.2026. Editorial use cases are hypothetical; no evidence of real customer results.
Editorially reviewed on: