Question: Should we allow duplicate keys in our JSON objects ?
- Vorherrschende Sprache
- Java
- Sterne
- 3.1k
- Forks
- 1.4k
- Ø Merge
- 6 T. 19 Std.
- Gemergte PRs (30 T.)
- 32
Beschreibung
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 ?
So it just shows two but there are many in the "GR" file
There is a discussion below about this:
https://stackoverflow.com/questions/21832701/does-json-syntax-allow-duplicate-keys-in-an-object
Beitragsleitfaden
Rechercherichtung
Beginne mit dem vorgeschlagenen pre-commit check-json hook und den von ihm gemeldeten JSON-Dateien, einschließlich der erwähnten "GR"-Datei, und prüfe anschließend den offenen PR #12245. Erledigt bedeutet, dass das Projekt eine festgelegte Richtlinie für doppelte Schlüssel hat, die betroffenen JSON-Dateien ihr folgen und die Prüfung konsistent besteht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- json
- Bereich
- build-system, tooling
- Issue-Typ
- Refactoring
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100