python - Why json.keys() get keys in different order -


hi have following code in python:

import json jsonpost = json.loads('{"player": {"_id": "3","firstname":"kim","surname":"jones"},"newtable": {"_id": "4","surname": "abcd"}}')  key in jsonpost.keys():     innerkey in jsonpost[key]:         print innerkey 

my question why when print out inner key order of keys jsonpost['player'] following:

_id , surname, firstname 

python dictionaries implemented internally hash table. means key order not preserved. issue?


Comments

Popular posts from this blog

c++ - protocol buffers - generate NON-inline accessors -

c# - issue attaching/adding an entity object which is detached from the DB Context? -