screen size not supported

Intentionally invalid sample JSON file

Last updated 2026-05-20

When to use this

Use this to verify your parser handles errors gracefully. The file mixes three common bugs — an unquoted key, a trailing comma, and a missing closing brace — so a strict parser will throw and a lenient one will fail informatively.

Verbatim contents (this will not parse)

123 B · 5 lines
{
  "ok": true,
  reason: "intentionally invalid",
  "items": [1, 2, 3,],
  "note": "this file is for parser error testing"

Full file is 123 B and 5 lines. Use Download for the complete payload.

Request examples

const fs = require('fs');
try {
  JSON.parse(fs.readFileSync('./sample-invalid.json', 'utf8'));
} catch (err) {
  console.error('parser error:', err.message);
}