๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

Web Development Intermediate

What is JSON Schema?

A vocabulary for validating the structure and content of JSON data, ensuring API requests and responses conform to expected formats.

JSON Schema defines the expected structure of JSON documents โ€” required properties, data types, value constraints, array item schemas, and nested object structures. It serves multiple purposes: API request validation (reject malformed input), documentation (clear contract for API consumers), code generation (auto-generate types from schema), and testing (verify API responses). Validators exist for every language (PHP: justinrainbow/json-schema, Python: jsonschema, JavaScript: ajv). JSON Schema supports references ($ref) for reusable definitions, conditional validation (if/then/else), and composition (allOf, anyOf, oneOf). It is used in OpenAPI/Swagger specifications for API documentation.

Related Terms

CORS Headers
HTTP headers that control cross-origin resource sharing between different domains, specifying allowed origins, methods, and headers.
CSS Flexbox
A CSS layout model that provides efficient arrangement of items within a container, handling alignment, distribution, and spacing.
HTTP/3
The latest HTTP version that uses QUIC instead of TCP, providing faster connections and better performance on unreliable networks.
CSS Grid
A two-dimensional CSS layout system for creating complex grid-based designs with rows and columns.
Content Negotiation
An HTTP mechanism where client and server agree on the best representation of a resource based on format, language, or encoding preferences.
AJAX
A technique for making asynchronous HTTP requests from a web page without reloading the entire page.
View All Web Development Terms โ†’