with open(file,"r") as f: data = json.load(f)
如果报错
UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte
将with open(file) as f: 改成 with open(file, ‘r’, encoding=’utf-8′) as f
with open(file,"r") as f: data = json.load(f)
如果报错
UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte
将with open(file) as f: 改成 with open(file, ‘r’, encoding=’utf-8′) as f