Skip to content

Instantly share code, notes, and snippets.

@shafi-codez
Created July 2, 2014 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shafi-codez/d58705ae4b6fdb566983 to your computer and use it in GitHub Desktop.
Save shafi-codez/d58705ae4b6fdb566983 to your computer and use it in GitHub Desktop.
ordererddict
__author__ = 'shafi'
import pprint
import json
import collections
json_data=open("cloud.json").read()
data = json.loads(json_data)
#print json.dumps(data,indent=4,sort_keys=False)
d = json.JSONDecoder(object_pairs_hook = collections.OrderedDict)
d1=d.decode(json_data)
print json.dumps(d1,indent=4,sort_keys=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment