import json
import csv
import sys
filename='D:\\program\\decision tree\\1601381460.json'#
with open(filename,'r',encoding='utf8') as file_obj:
datas = json.load(file_obj)
print(datas.keys())
很简单的json读取,但遇到JSONDecodeError:Extra data:的错误,原因是json格式本身有问题,括号对不上。