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

3
  • What programming language are you trying to do this for? Commented May 5, 2016 at 21:37
  • Please tag it as such then, so that the question can be found more easily. Commented May 7, 2016 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. Commented May 10, 2016 at 20:11

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.