Add option to return objects as Maps to support ordered properties
I maintainer di solito rispondono entro 1 giorno
@jordanbtucker ci sta già lavorando.
Dal 28/8/2019.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
I understood that the json object is designed to be unordered, and json arrays will preserve order. So if I would like to preserve the order , then I should use list instead of object, but it is not convenient if I have an OrderedDictionary in the backend.
Now I am using c# for backend, in c#, it has OrderedDictionary which will preserve the order. After I marshal the OrderedDictionary to json, the order will be lost. When I debug the code, I found the OrderedDictionary was totally fine , the only problem was JSON changed the order of the key.
After I google about how to solve the problem, I realized that I am not the only one who asked about how to keep the order of keys in json object. Most backend languages have something similar to OrderedList, when they marshal to json , they have the same problems, and all the solutions say that we should use array instead of object.
Can we have a new type of object to keep the order of the keys so that the OrderedDictionary can marshal to json with preserved order? Thanks.
- Lingua principale
- JavaScript
- Stelle
- 7.2k
- Fork
- 288
- Merge medio
- 1g 6h
- PR unite (30g)
- 35
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di json5/json5
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
json5/json5#418 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
reviver visits elements added to an array during revivalForse già presa @Huzaifa-Asif l’ha presa 15 giorni fa. Apertabug :bug:
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
I maintainer di solito rispondono entro 1 giorno
-
VS Code extensionAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
json5/json5#357 · 1 commento · 13 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
CLI should process consecutive JSONsForse di nuovo libera @jordanbtucker l’ha presa 860 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement :+1:
json5/json5#346 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Issue simili
-
good first issue
Difficoltà 2/5 3-5 giorni Idoneità per principianti 62/100
paipai1999/POS-system#3 ·
-
good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
r-afael/better-yt-recommendations#36 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
microsoft/playwright#43875 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
cli good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Run the dependency drift checkForse già presa @spaceninja l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
cloudfour/stylelint-config-cloudfour#683 ·
I maintainer di solito rispondono entro 1 giorno