anber
anber

Reputation: 3665

json parsing during download

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?

Upvotes: 0

Views: 76

Answers (1)

Idistic
Idistic

Reputation: 6311

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.

Upvotes: 1

Related Questions