Data Formats
data
formats
api
What is JSON Schema?
Definition
JSON Schema is a vocabulary that allows you to validate the structure and content of JSON data. It defines the expected types, required fields, patterns, and constraints for JSON documents, similar to how XML Schema validates XML.
Why It Matters
JSON Schema validates API request/response bodies, configuration files, and form inputs. It catches data errors early, generates documentation automatically, and enables editor autocompletion. OpenAPI (Swagger) uses JSON Schema for API specification.