0

I am trying to read multiple json objects from a file. This is a very large file and I don't want to do read every character and check for braces. Any thoughts how this can be deserialized from file stream?

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}]

Here's a solution for valid json file. Deserialize json array stream one item at a time

Community
  • 1
  • 1
  • What programming language are you trying to do this for? – JW Lim May 05 '16 at 21:37
  • Please tag it as such then, so that the question can be found more easily. – JW Lim May 07 '16 at 21:46
  • Is it a general question or you need solution for file with specific formatting? Because json file you show above can be parsed line by line without any problems. And if it IS a general question, well good luck. – bamanow May 10 '16 at 20:11

0 Answers0