JSON

JSON Schema Validator

JSON データが JSON Schema(draft-07 スタイル)に準拠しているか検証 — 各違反の正確なパスと説明付き。


                        
                    

JSON Schema describes the expected structure of a JSON document — which fields are required, what type they are, and what constraints apply to their values. This tool checks actual data against a schema and shows the exact path to every violation.

How to use it

Common uses

Things to keep in mind

JSON Schema has several versions (draft-07, 2019-09, 2020-12) with small syntax differences — check which version your production validator actually expects.

required only checks that a field is present, not its value — an empty string or null still counts as "present" if the type allows it.

このツールに関する記事: JSON Schema:JSONの構造を記述し検証する方法

よくある質問

このJSON Schemaバリデーターは何をするツールですか?

JSONデータがJSON Schema(draft-07形式)のルールを満たしているかを検証し、違反のあるすべての箇所について正確なパスと理由を表示します。

検証エラーは具体的に何を意味していますか?

そのパスの値がスキーマの制約を満たしていないことを意味します。型が間違っている、必須プロパティが不足している、パターンに一致しない、値が範囲外であるなどが典型例です。

スキーマやデータはサーバーで処理されますか?

されません。検証はすべてブラウザ内のJavaScriptで行われ、スキーマもデータも送信されません。

additionalProperties: false は何をしますか?

デフォルトでは、オブジェクトは properties に記述されているもの以外のフィールドも含むことができます。additionalProperties: false は余分なフィールドを禁止します — キー名のタイプミスや、うっかり残ったdebug用フィールドを検出するのに便利です。

複数の型を許容するフィールドは記述できますか?

はい、type に配列を使います。例えば "type": ["string", "null"] は、フィールドが文字列またはnullのどちらかであることを許容します。より複雑なパターンには oneOf、anyOf、allOf といったキーワードを使います。

記事: JSON