python parse json file

36

save json to file -

import json

data = {}

with open('data.txt', 'w') as outfile:
    json.dump(data, outfile)

python parse json file -

import json
with open('data.json') as f:
	data = json.load(f)

Comments

Submit
0 Comments