Parsing huge JSON object in Android?

帅比萌擦擦* 提交于 2019-12-04 13:40:36

Take a look at the Jackson JSON parser, it's faster than the one in Android, and faster than GSON, and supports streaming.

http://jackson.codehaus.org/

I do however reiterate the point made by others that your JSON is HUGE and that does suggest a non-optimal design. e.g. if the connection is wonky and it fails a few times you could cause your user to incur additional data costs on a mobile data plan. Always better to break it down where possible so failure doesn't involve requesting the whole lot again.

You might look into JsonStreamParser in gson if you are looking for an interface that streams json objects instead of parsing everything immediately.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!