Guide
Fix JSON Parse Error: Expected Property Name
This error usually means a parser reached an object key that is not valid JSON: an unquoted key, a comment, a trailing comma, or JavaScript syntax inside a strict JSON document.
What the error means
JSON object members must always start with a double-quoted property name. When a parser says expected property name or expected property name or '}', it is usually standing just after an opening brace or comma and looking for a key like "name". If it sees name, // comment, /* comment */, or a closing brace after a trailing comma, it stops because those patterns belong to JavaScript, not strict JSON.
Most common causes
The fastest way to debug this error is to inspect the character at the reported line and column, then look one token before it. Most reports come from one of four small mistakes.
- Unquoted object keys, such as { name: "Ada" }
- Single-quoted keys or strings, such as { 'name': 'Ada' }
- Comments copied from JavaScript or JSONC files
- A trailing comma before } or ]
Broken example
{ name: 'Ada', active: true, // copied from a JS object }
Fixed JSON
{ "name": "Ada", "active": true }
Repair checklist
Quote every key with double quotes, convert single-quoted strings to double-quoted strings, remove comments, remove final commas, and make sure booleans and null are lowercase. After repair, run a strict validation pass before saving the value into a config file, sending it to an API, or pasting it into a database migration.
When automatic repair is safe
Automatic repair is safe for syntax cleanup when the intended structure is obvious. It should not be treated as business validation. If a key name, numeric value, date, or enum could be ambiguous, repair the syntax first and then compare the repaired output against the source system or API schema.