JSON Schema 验证器
使用 JSON Schema 验证文档。查看验证错误,可选择检查格式。
使用方法
- 粘贴输入内容或加载下方示例。
- 调整选项后点击“验证 JSON”。
- 检查结果,然后复制或下载。
无需上传,无需账户,处理完全在浏览器内完成。
输入示例
{
"id": "0192f4d2-6a2b-7c3d-8e4f-5a6b7c8d9e0f",
"email": "ada@example",
"age": 12,
"roles": ["admin", "owner"],
"nickname": "ada"
}{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"required": ["id", "email", "roles"],
"properties": {
"id": { "type": "string", "format": "uuid" },
"email": { "type": "string", "format": "email" },
"age": { "type": "integer", "minimum": 13 },
"roles": { "type": "array", "items": { "enum": ["admin", "editor", "viewer"] }, "uniqueItems": true }
},
"additionalProperties": false
}