jsonlines具体读取代码如下: 1importjsonlines23with open("xxxx.jl","r+", encoding="utf8") as f:4foriteminjsonlines.Reader(f):5print(item) json-lines具体读取代码:https://shamsurrahim.wordpress.com/2017/04/17/how-to-read-jsonl-file-in-python/ 1importjson_lines23with open('fileName.jso...
api 读取文件有一个具体原因,所以请将此视为事实。 jsonlines包参考: https://jsonlines.readthedocs.io/en/latest/#jsonlines.Reader import jsonlines with open('example.jsonl', 'r') as jsonl_f: content = jsonl_f.read() with jsonlines.Reader(content) as reader: lst = [obj for obj in re...