Android - How to read large JSON data effectively
I am beginning Android Development. I am reading large JSON data from the server. How can I proc开发者_开发问答ess this data effectively.
Thank You.
If you are concerned about speed then I'd recommend Jackson. It's very fast: http://www.cowtowncoder.com/blog/archives/cat_performance.html
OTOH, your network latency is going to be much greater then the time it takes to parse JSON. So in real-world conditions speed of parsing is not going to affect you app speed much.
Another library is GSON which I am using in my project: http://code.google.com/p/google-gson/
Please take the effort to post more information along with your question.
With the constraint memory of the handsets, the question of parsing huge amounts of data becomes a question of space before it becomes a question of speed. The built-in org.json library may not be best in speed, but limiting the dataset.to.process may have a much larger impact on overall performance than selecting a different library that uses a few cycless less.
精彩评论