错误:“ ValueError:无法解码JSON对象”

时间:2018-06-22 06:21:53

标签: python json export-to-csv

以下是我的简单JSON代码,其中显示了

  

错误:“ ValueError:无法解码JSON对象”

import csv, json

infile = open("01_ZD_20180501_00407_001.json","r")
outfile = open("01_ZD_20180501_00407_001.csv","w")

writer = csv.writer(outfile)

for row in json.loads(infile.read()):
    writer.writerow(row)

错误显示如下

0 个答案:

没有答案