§ 2.1What “valid” means here
Valid means the text follows RFC 8259, the JSON standard: double-quoted strings and keys, no trailing commas, no comments, and only the values true, false, null, numbers, strings, arrays and objects. This is syntax validation. It does not check your data against a JSON Schema.
§ 2.2Reading the error position
Parsers report where they gave up, which is often one character after the real mistake. A missing comma between two properties is reported at the start of the second property; a trailing comma is reported at the closing brace. Look at the line shown and the one above it.
§ 2.3JSON vs. JSONC vs. JSON5
| Format | Comments | Trailing commas | Used by |
|---|---|---|---|
| JSON | No | No | APIs, package.json |
| JSONC | Yes | Allowed by some tools | VS Code settings, tsconfig.json |
| JSON5 | Yes | Yes | Some config files |
If your file is tsconfig.json and this validator complains about comments, the file may still be fine for TypeScript — it reads JSONC.
§ 2.QQuestions
Why does a file that works in my editor fail here?
Your editor may accept JSONC or JSON5 (comments, trailing commas). This tool checks strict JSON, which is what APIs and JSON.parse expect.
Can it validate against a JSON Schema?
Not yet — it checks syntax only.
§ 2.RReferences
Last reviewed 2026-10-14.