我试过下面的代码,但它不起作用
import json
with open("/Users/elton/20210228test2.ndjson") as f:
test2data = ndjson.load(f)发布于 2021-03-24 22:08:27
这对我很有效。import ndjson而不是import json。点击此处查看更多信息:https://pypi.org/project/ndjson/
import ndjson
# load from file-like objects
with open('data.ndjson') as f:
data = ndjson.load(f)https://stackoverflow.com/questions/66782750
复制相似问题