import json #reading with open(file_name, 'r') as f: data = json.load(f) #writing with open(file_name, 'w') as f: json.dump(data, f) #use indent to make easyer to read eg. indent = 4