maintaining order in json (python flask) -


i made sorted dictionary pass through json javascript, however, seems whenever throw json.dumps() changes order alphabetical keys. critical keep in order or else not work. there way achieve this?

objects in json unordered collection of key:value pairs (same dictionaries in python), should use different data structure if order relevant.

a structure (in json) work:

{ "columns" : [ "id", "name", "age"],   "rows" : [[ "john", "john doe", 42],             [ "jane", "jane miller", 28]     ] } 

Comments

Popular posts from this blog

Need help in packaging app using TideSDK on Windows -

java - Why does my date parsing return a weird date? -