with open('/Users/liweijing/Desktop/处理结果/10.14post_douyin.jsonl', 'w') as outfile:
for entry in count:
json.dump(entry, outfile, ensure_ascii=False, cls=DateEncoder)
outfile.write('\n')
其中count是Python对象里面包括字典,列表,count是要转成jsonl的数据。
如图: