简体   繁体   中英

How to make parsing faster for large and complex JSON?

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

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 .

根据一些基准,杰克逊是最快的。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM