JSON Unquoted Keys

In JSON, every object key must be a double-quoted string. Unquoted or single-quoted keys are invalid.

Common causes

How to fix

Examples

Bad

{ name: "test" }

Good

{ "name": "test" }

FAQ

Can JSON keys be unquoted?
No. The JSON spec requires keys to be double-quoted strings.
Why does JavaScript allow unquoted keys but JSON does not?
JSON is a data format meant to be strict and portable; JavaScript is a language with looser syntax.

Fix it now

Try in validator (prefill this example)

Related

All tools · Canonical