1

This is a continue question by here. Now the problem is, there is no line break in each line. All data stick together, how can I do that? Like this:

{"bla":"bla"}{"bla":"bla"}{"bla":"bla"}{"bla":"bla"}{"bla":"bla"}{"bla":"bla"}.....

Thanks!

Community
  • 1
  • 1
SPG
  • 6,109
  • 14
  • 48
  • 79
  • Do you need to do this to view it or in your application because there are web sites that can format it for you http://jsonlint.com/ ? – Steve Jul 28 '11 at 14:03

1 Answers1

1

Read in the JSON file as a single String and replace "}{" with "}\n{". Pass the resulting String into a StringReader and you can read it line by line.

rossum
  • 15,344
  • 1
  • 24
  • 38