Question: Should we allow duplicate keys in our JSON objects ?
- Langage dominant
- Java
- Étoiles
- 3.1k
- Forks
- 1.4k
- Merge moyen
- 6 j 19 h
- PR mergées (30 j)
- 32
Description
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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par le hook pre-commit check-json proposé et les fichiers JSON qu’il a signalés, y compris le fichier "GR" mentionné, puis examinez le PR #12245 ouvert. C’est terminé lorsque le projet dispose d’une politique définie concernant les clés dupliquées, que les fichiers JSON concernés la respectent et que la vérification réussit systématiquement.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- json
- Domaine
- build-system, tooling
- Type d'issue
- Refactorisation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100