在用json.dump写入json文件的时候加入indent参数就可以实现json的格式化
json_file = imagePH[:-4] + '.json'
json.dump(data_90, open(json_file, 'w'),indent=2)
在用json.dump写入json文件的时候加入indent参数就可以实现json的格式化
json_file = imagePH[:-4] + '.json'
json.dump(data_90, open(json_file, 'w'),indent=2)