Validate JSON data with schemas, types, required fields, formats, composition, and API contracts.
Lessons
Validate deeply nested data structures.
Nested Objects & Arrays is easiest to learn by reading the example, changing it, and observing the result.
{
"type": "object",
"required": ["slug", "title"],
"properties": {
"slug": { "type": "string", "pattern": "^[a-z0-9-]+$" },
"title": { "type": "string", "minLength": 3 },
"minutes": { "type": "integer", "minimum": 1 }
},
"additionalProperties": false
}Practice the Nested Objects & Arrays example in a small scratch file, then explain what changed and why.