Skip to content
Yunedia Tools

JSON Schema 验证器

使用 Ajv 根据 JSON Schema 验证 JSON 数据,并列出每一处违规及其路径。完全在你的浏览器中运行。

使用方法

Put a JSON Schema in the first editor and the JSON data to check in the second, then press Validate. Validation uses Ajv with all-errors reporting: every mismatch is listed with its path (for example /age) and message. The Person and Product example buttons load ready-made pairs — try changing the data values to see errors appear. If the schema itself is invalid against the draft meta-schema, that is reported too.

注意事项

Everything runs locally; neither the schema nor the data leaves your browser. Note that format assertions such as format: "email" are treated as annotations by Ajv's default build (ajv-formats is not bundled), so they are not enforced — use pattern if you need to check a format here.

常见问题

Which JSON Schema draft is supported?

Ajv's default, draft-07. Schemas declaring draft 2019-09 or later may behave differently.

Why do I only see one error?

All-errors reporting is enabled, so validation errors are all listed. The exception is a schema that fails to compile — that stops the process earlier.