2

I want to parse a large JSON. How can I make it faster? Now it takes a lot of time. Please help me.

Peter O.
  • 32,158
  • 14
  • 82
  • 96
SREEJITH
  • 816
  • 1
  • 8
  • 19
  • 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 Answers3

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.

You can check comparison article over here.

Jigar Pandya
  • 6,004
  • 2
  • 27
  • 45
0

According to some benchmarks Jackson is the fastest.

antew
  • 7,468
  • 3
  • 23
  • 17
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