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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

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

Need help in packaging app using TideSDK on Windows -