JSON Serialization with Integer-keyed Maps #71
Labels
No labels
bug
discussion
documentation
duplicate
ignore
new feature
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
golibs/gms-gods#71
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The following example doesn't seem to work:
The serialized JSON has the integer keys in quotes -
{"1":"a","2":"b"}which is, of course, the only possibility conforming to JSON spec. However, this is counter-intuitive. Would it not be better to store an array of key/value pairs?I am afraid that it be even more counter-intuitive to store a map data structure as an array JSON representation.
Given the JSON specification, I frankly do not see any way to make this more intuitive. For now, as you'd expect, this should work:
It doesn't work. It won't parse the produced json
@paralin ok, i'll check it out.
@paralin
this does work
the other issue of converting numbers to strings is explained above