中文不显示是因为没加上encoding="utf-8“吗,加上就报错》。。。目前格式这样
fieldnames = ("id","text")
index ={'index':{}}
reader = csv.DictReader( csvfile, fieldnames)
next(reader)
for row in reader:
json.dump(index,jsonfile)
jsonfile.write('\n')
json.dump(row, jsonfile)
jsonfile.write('\n')