Examples
-
Instance
{"name":"Ada","age":30} -
Schema
{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"age":{"type":"number"}}}
About JSON Schema Validator
A JSON document can be syntactically perfect and still violate every business rule your API cares about - wrong types, missing required fields, values out of range. That's what JSON Schema is for, and what plain JSON validation can't catch.
Paste an instance and a Draft-07-style schema and validate them against each other using Ajv, loaded and run entirely in your browser - both stay local, nothing is uploaded.
FAQ
- Which draft?
- Draft-07 style schemas supported by Ajv.