JSON Duplicate Keys

JSON allows duplicate keys in an object, but parsers typically keep only the last value. Duplicate keys often indicate a mistake.

Common causes

How to fix

FAQ

What happens with duplicate keys in JSON?
Most parsers use the last occurrence; earlier values are overwritten. Behavior can vary.
Is duplicate key valid JSON?
Yes, it is valid per the spec, but it is usually a logic error.

Fix it now

Try in validator (prefill this example)

Related

All tools · Canonical