Json¶save dict to json¶# to json strong json_str = json.dumps(data) # to json file with open('data.json', 'w') as outfile: json.dump(data, outfile) load json to dict¶# json string to dict json.loads(json_str) # json file to dict with open('data.json', 'r') as inputfile: data = json.load(inputfile)