Skip to content
This repository was archived by the owner on Jun 16, 2021. It is now read-only.
This repository was archived by the owner on Jun 16, 2021. It is now read-only.

Should fail or warn on duplicate field name #8

@benkant

Description

@benkant

When I validate the following code on JSONlist.com:

{
    "keya": 1,
    "keyb": 0,
    "keya": 0
}

It reports valid JSON. The last value "keya" is taken and the previous is ignored. Some JSON libraries do the same, but AFNetworking in particular fails for duplicate field names.

JSlint reports:

Problem at line 4 character 5: Duplicate 'keya'.

"keya": 0

JSON: bad.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions