I want to parse a large JSON. How can I make it faster? Now it takes a lot of time. Please help me.
Asked
Active
Viewed 1,457 times
2
-
Use a library that has been tested and optimized for that already. Why are you writing your own? – dchhetri Dec 01 '12 at 04:38
-
possible duplicate of [Sending and Parsing JSON in Android](http://stackoverflow.com/questions/2818697/sending-and-parsing-json-in-android) – devunwired Dec 01 '12 at 04:49
3 Answers
0
you can use some wrappers like http://code.google.com/p/json-simple/ it is optimised to handle large data from json and easy to use.
Also you can give it try to http://code.google.com/p/json-simple/ for better performance.
Following are the others.
- Android built-in: http://developer.android.com/reference/org/json/package-summary.html
- JSON.simple: http://code.google.com/p/json-simple/
- Jackson: http://jackson.codehaus.org/
- Gson: http://code.google.com/p/google-gson/
You can check comparison article over here.

Jigar Pandya
- 6,004
- 2
- 27
- 45
0
Use jackson JSON processor http://jackson.codehaus.org/ Most of the time people end up parsing the whole JSON and ignoring most of the data. This makes the process slow. If you are going to discard a lot of data, parsing in SAX mode is much faster, since you can stop parsing as soon as you have found all the required data.

Kiran Kumar
- 1,192
- 8
- 10