Add option to return objects as Maps to support ordered properties
Los mantenedores suelen responder en 1 día
@jordanbtucker ya está trabajando en esto.
Desde el 28/8/2019.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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.
- Lenguaje dominante
- JavaScript
- Estrellas
- 7.2k
- Forks
- 288
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 35
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de json5/json5
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
json5/json5#418 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
reviver visits elements added to an array during revivalPosiblemente ocupada @Huzaifa-Asif la tomó hace 18 días. Abiertobug :bug:
Dificultad 1/5 Menos de una hora Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
VS Code extensionAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
json5/json5#357 · 1 comentario · 13 reacciones ·
Los mantenedores suelen responder en 1 día
-
CLI should process consecutive JSONsQuizá libre de nuevo @jordanbtucker la tomó hace 863 días y no hay ningún pull request abierto. Abiertoenhancement :+1:
json5/json5#346 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de json5/json5
Issues similares
-
test-reliability
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Azure/azure-sdk-for-js#40672 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
txn2/mcp-data-platform#2492 ·
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
liberation-data/drivine#639 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
accessibility ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
prophet-technocracy/civilizational-emergency-protocol#59 ·
Los mantenedores suelen responder en 1 día
-
type: bug
Dificultad 1/5 1-3 horas Aptitud para principiantes 72/100
RocketChat/Rocket.Chat#43554 · 1 comentario ·
Los mantenedores suelen responder en 1 día