Generate a draft-07 JSON Schema from a sample document, then validate other documents against it. Generation preloads the schema box, so the natural flow — paste, Generate, break the document, Validate — is two clicks.
The validator covers the everyday draft-07 keywords: type, properties, required, items, enum, minimum/maximum, minLength/maxLength, pattern, minItems/maxItems and additionalProperties: false. Errors are listed with their JSON paths.
Frequently asked questions
Why is every key in the generated schema required?
A single sample cannot prove a key optional. Generation is a starting point — delete entries from "required" for the keys your data may omit.
Which draft is supported?
Generation targets draft-07 (the most widely deployed). Validation accepts the common draft-07 keyword subset; exotic keywords ($ref, if/then, oneOf) pass silently rather than erroring on support.
中文说明
从样例文档生成 draft-07 JSON Schema,再据此校验其他文档。生成会自动填入校验框,所以「粘贴 → 生成 → 改坏文档 → 校验」这条最自然的路径只需两次点击。
校验器覆盖日常 draft-07 关键字:type、properties、required、items、enum、minimum/maximum、minLength/maxLength、pattern、minItems/maxItems 与 additionalProperties: false。错误按 JSON 路径逐条列出。
常见问题
为什么生成的 Schema 里所有键都是必填?
单一样本无法证明某个键可省略。生成结果只是起点——数据中允许缺失的键,从 "required" 数组里删掉即可。
支持哪个版本?
生成面向 draft-07(部署最广)。校验接受常用 draft-07 关键字子集;生僻关键字($ref、if/then、oneOf)会静默跳过而非报「不支持」错。