我正在尝试从文件中读取多个json对象。这是一个非常大的文件,我不想读取每个角色并检查大括号。有什么想法如何从文件流反序列化?
test.json
[{"name": "foo","id": 1},{"name": "bar","id": 2},{"name": "a","id": 3}]
[{"name": "foo","id": 1},{"name": "bar","id": 2},{"name": "a","id": 3}]
[{"name": "foo","id": 1},{"name": "bar","id": 2},{"name": "a","id": 3}]
这是有效json文件的解决方案。 Deserialize json array stream one item at a time