Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- import types
- path= "R:/IT/temp/json_object.test"
- test_dict = {'a':'1','b':'2','c_sub':{'sub':'item'}}
- dump_file = open(path,'w')
- obj = json.dumps(test_dict)
- dump_file.write(obj)
- dump_file.close()
- load_file = open(path, 'r')
- string = json.load(load_file)
- print types.TypeType(string)
- for a,b in string.iteritems():
- print a,b
Add Comment
Please, Sign In to add comment