36 chars · 4 lines
Two-way sync · Edit either side and the other updates automatically.
role: "admin"36 chars · 4 lines
Two-way sync · Edit either side and the other updates automatically.
role: "admin"JSON object parser error
Inside a JSON object, every property name must be a double-quoted string. If the parser reaches an identifier, closing token in the wrong place, or other punctuation where a key should begin, it reports an expected-property-name error. This tool is free to use. No account or payment is required.
Last updated
Diagnose the problem
JavaScript object literals can use identifier-like keys without quotes, but JSON cannot. A copied configuration object may therefore look familiar while failing strict JSON parsing.
Parsers often report the token where they finally know the object grammar is impossible. The actual mistake may be the comma, quote, or colon immediately before that location.
Resolve the issue
Use the solving tool
Run the focused checker with the failing payload to locate the parser error and inspect the nearby source before changing data.
Open JSON Error CheckerThe role key is valid JavaScript-style syntax but must be quoted in JSON.
{
"name": "Ada",
role: "admin"
}{
"name": "Ada",
"role": "admin"
}Common questions
No. Standard JSON requires object property names to be double-quoted strings.
JavaScript object literal syntax is broader than JSON and permits many identifier-like keys without quotation marks.
Yes. After a comma the parser expects another property name, so a closing brace can be reported as unexpected depending on the runtime.
Debugging a specific JSON issue? Browse JSON troubleshooting.