Skip to content

Question: Should we allow duplicate keys in our JSON objects ? #11277

@jbampton

Description

@jbampton

I was attempting to add the official pre-commit hook check-json

https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#check-json

And when testing the hook locally it showed two JSON files that had duplicate keys.

Should we standardize all our JSON files and enable checking or continue with the current inconsistent approach ?

Image

So it just shows two but there are many in the "GR" file

Image Image

There is a discussion below about this:

https://stackoverflow.com/questions/21832701/does-json-syntax-allow-duplicate-keys-in-an-object

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions