0

Is it possible to parse json in parts when it was still downloaded? For example I load a long json array with a very slow Internet. Can I download a part of text, parse it, add to screen, download next part and so on?

anber
  • 3,463
  • 6
  • 39
  • 68
  • Jackson provide streaming reading & writing option for JSON http://jackson.codehaus.org/ – rajpara Sep 05 '12 at 15:26
  • i don't think it's possible, parsing a part of json string will likely generate Exception only. – Sark Sep 05 '12 at 15:57

1 Answers1

1

Check out the following SO question it has a few answers, but generally the consensus seems to be that you can depending on the package you are using. I have used GSON (Mentioned in the answers) but have never tried the incremental streaming feature.

GSON makes a lot of things much easier in general though, so I would check that out first if the other things GSON offers seem like a plus to whatever you are trying to do.

Community
  • 1
  • 1
Idistic
  • 6,281
  • 2
  • 28
  • 38