JsonForge · JSON · アップロード 0
JSON が自分の誤りを指します。
行、列、そしてその文字。
このタブで解析します。
Unexpected token は午前三時に何も教えてくれません。貼り付ければ、JsonForge が解析の壊れた行・列とその文字を指し、整形し、どのノードの JSONPath でもコピーできるツリーを開き、サンプルが含意するTypeScript インターフェースやZod スキーマを書き、CSV に平坦化します。
Format, minify, validate
the error is the feature-
Walk the document
click any node · copies its pathKeys that are not plain identifiers are copied in bracket form, $["a-b"].items[0], so the path pastes straight into a JSONPath query. Very large arrays are listed 300 at a time instead of all at once.
Types from a sample
inference, not a contract-
-
An object that appears as {...} inside an array is merged across every element: a field missing from some elements becomes ? / .optional(), and a field that is a string in one and a number in another becomes a union. Empty arrays cannot say what they hold, so they come out as unknown · type them by hand.
Flatten to rows
dotted columns · round tripNested objects become dotted columns; an array stays in one cell as compact JSON, because it has no fixed number of columns. Empty cells are null and missing fields. CSV downloads carry a UTF-8 BOM so Excel opens Korean without mojibake.
-
解析が実際にしていること
混同されやすい三つ01誤りは一度に一つ
JSON.parse は受け付けられない最初のトークンで止まるので、指摘された文字を直すと次の誤りが現れます。道具が怠けているのではなく、文法上、不正なトークンの先へ進む方法がないため、どのパーサーもこう動きます。直して、貼り直して、繰り返します。
02重複キーは合法
RFC 8259 は名前が一意であるべきと推奨するだけで禁止はせず、どのエンジンも最後の値を黙って採用します。"port" が二つある設定も解析は通り、読む前に上書きされた値で一時間を使うことになります。
03数値は精度を失う
JSON の数値は IEEE-754 の倍精度になるため、9007199254740993 のような id は値が変わって戻り、19 桁の口座参照番号は静かに狂います。長い識別子は両側とも文字列でやり取りしてください。
よくある質問
誤り · プライバシー · 型文法は正しいのにアプリが拒否します。なぜ?
null、日付の形式が違う、数値を文字列で送った。実際に受け取った応答を TypeScript · Zod タブに入れて、コードが期待するものと比べてください。違いはたいてい省略可能なフィールド一つか、型一つです。