Apache Johnzon vs Jackson Apache Johnzon vs Jackson apache apache

Apache Johnzon vs Jackson


There are some performance benchmarks up on github. But for each of them you really have to verify if the benchmark is actually correctly implemented. For what I've seen most benchmarks use the official javax.* APIs in a sub-optimal way. Most use Json.createGenerator, etc but they should actually use JsonProvider.provider() and store this away for your operations. Then call createGenerator etc on this JsonProvider. That way you can make sure that you really get comparable results.We have done quite a few tests and for me the numbers of Johnzon look really good. And especially since it's much smaller than most other JSON libs.


As mentioned in several other sources and mailing lists(TomEE, for example), the performance gain, if any, is negligible especially when you compare it to the overall request-response processing chain.

If you use Spring Boot, you will find a lot more community support and flexibility in terms of features for Jackson.Jackson has tons of different modules and good support for other JVM languages(for example KotlinModule).

We, in my project, also use quite a lot of Clojure, where we use Cheshire, which relies on Jackson under the hood.

In the end, it's up to you what to use and whether the cases I mentioned are applicable to your project, but so far I haven't seen any compelling performance reports about Johnson and until it happens, I would go for a library with a lot higher adoption in the industry.