Question: Should we allow duplicate keys in our JSON objects ?
- Lingua principale
- Java
- Stelle
- 3.1k
- Fork
- 1.4k
- Merge medio
- 6g 19h
- PR unite (30g)
- 32
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con l’hook pre-commit check-json proposto e i file JSON che ha segnalato, incluso il file "GR" menzionato, quindi esamina il PR #12245 aperto. Il lavoro è completato quando il progetto ha una policy definita per le chiavi duplicate, i file JSON interessati la seguono e il controllo passa in modo coerente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- json
- Ambito
- build-system, tooling
- Tipo di issue
- Refactoring
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100