Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

spring-json vs jackson for spring framework 3.0.5

I'm about to choose a JSON library to a spring based application and want to get some pros and cons for both solutions. Of course conditional pros and cons are well seen :)

Thanks in advance!

like image 802
Random Avatar asked Jun 19 '11 15:06

Random


1 Answers

If performance matters, there is nothing on Java platform that comes even close to Jackson with respect to performance (see this, this or this as initial data points). Some newer libraries (such as "json-smart") claim to be lightweight, fast(er), but have no external verification; most often since their own results do not follow performance measurement best practices. So to know performance details for your specific use case, do test them with your own data and see how things go, in addition to doing bit of googling.

Other than performance, there's this blog post ("7 Jackson killer features") that outlines what Jackson has to offer on its own (not considering integration with frameworks) -- other libraries have their own strengths, and for flex-json I understand its output side (writing JSON) is quite flexible and powerful. And if you absolutely want to minimize JSON library (jar) size, "Stringtree" and GSON-streaming are decent choices (but do not offer data-binding).

like image 102
StaxMan Avatar answered Oct 07 '22 21:10

StaxMan