Replace standard Android JSON parser for better performance?

前端 未结 5 1449
生来不讨喜
生来不讨喜 2021-02-14 17:19

I know that Android has a JSON parser baked in but I was wondering if it was worth using something that offered better performance (like Jackson - see http://jackson.codehaus.or

5条回答
  •  半阙折子戏
    2021-02-14 17:44

    Well, here are a couple of links comparing Jackson JSON performance with existing JSON, SAX, and Protocol Buffers. According to the author, Jackson is faster than SAX or the built-in JSON and about on par with Protocol Buffers. That last part sounds a little suspicious, but, regardless, it certainly appears Jackson works on Android and may be worth some experimentation.

    I haven't checked the JAR size, though. If it's huge, unless you were dying for extra JSON performance, it might not be worth the space hit.

提交回复
热议问题