You better use Jackson2

https://github.com/FasterXML/jackson

Java EE 7 has also a new JSON processing API, brand new!

http://docs.oracle.com/javaee/7/api/javax/json/package-summary.html

Profiling the different libs will provide answers. For enterprise applications, I never use GSON.

Answer from Stefaan Neyts on Stack Overflow
Discussions

The Newest Java Json Benchmark Results just dropped
Jackson performance good enough to support the bulk of use cases, and tons of support. Looks like I won’t be moving More on reddit.com
🌐 r/java
55
124
May 1, 2023
Actual JSON serialization benchmark for Java-APIs - Stack Overflow
I'm looking for an benchmark for different serialization APIs. All I found are outdated Posts and Articles from a year and more before. So I'm hoping that anyone could share a link to an up to date More on stackoverflow.com
🌐 stackoverflow.com
json - Java Jackson Large Object Serialization Optimization - Stack Overflow
I am using Jackson to serialize large objects about hundreds of other objects in it. This comes with the performance problems. Most of the custom Serialization class is same as "AmountAsStringSerializer" in the "JSONSerializer" class and all defined static. More on stackoverflow.com
🌐 stackoverflow.com
android - Jackson JSON Parser performance - Stack Overflow
Multiple posts on the Internet point toward Jackson as having better parsing performance than GSON, granting somewhere in the neighborhood of 20-30% speed improvement. http://rick-hightower.blogsp... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Oracle
blogs.oracle.com › javamagazine › java-json-serialization-jackson
Efficient JSON serialization with Jackson and Java | javamagazine
These benefits are counterbalanced by some negatives; the biggest is that a document serialized by JSON can be quite large, which can contribute to poor performance for larger messages.
🌐
Reddit
reddit.com › r/java › the newest java json benchmark results just dropped
r/java on Reddit: The Newest Java Json Benchmark Results just dropped
May 1, 2023 - Sounds a lot like avaje-jsonb which uses source code generation and can either use Jackson core under the hood or its own faster generator/parser. A relatively major performance boost that can be used that is not in Jackson is to use pre-encoded keys in deserialisation. Jackson can use pre-encoded keys for serialisation but not the other way around.
🌐
Medium
medium.com › @abhaybansal.1988 › java-json-serialization-shootout-which-library-reigns-supreme-5ffd66018fe4
Java JSON Serialization Shootout: Which Library Reigns Supreme? | by Abhay Bansal | Medium
August 30, 2025 - Fastjson/Fastjson2: Excellent overall performance, often leading or very competitive in both serialization and deserialization, especially for custom objects and higher data volumes. Fastjson2 has a notable edge in some custom object scenarios. Jackson: A consistently strong and reliable performer, usually a close second or third. A robust choice for general use. Gson: A solid, general-purpose library, though typically not the top performer in these benchmarks. org.json.JSONObject: Consistently the slowest due to its more manual approach and less optimized internal implementation for complex objects.
🌐
Apache
fory.apache.org › blog › fory_json_fastest_java_json_framework
Introducing Apache Fory™ JSON: Blazingly Fast JSON Serialization for Java | Apache Fory™
August 11, 2026 - Fory JSON's performance comes primarily from four implementation choices. Minimal temporary allocation. A ForyJson instance reuses prepared type metadata, execution state, and retained writer buffers. For most basic scalar values, the hot serialization path is effectively zero-allocation beyond the requested output: Fory writes the value directly into its output buffer instead of first converting it into a Java String.
🌐
Girija Swain
gsswain.com › 2025 › 12 › 07 › java-serialization-performance-showdown.html
Java Serialization Performance Showdown | Girija Swain
December 7, 2025 - A key, unmeasured factor in the ... the object was serialized to ~750 bytes. Text Formats (JSON, Avro JSON): Are much more verbose, resulting in a payload size of ~1220 bytes—over 60% larger!...
🌐
Baeldung
baeldung.com › home › java › core java › different serialization approaches for java
Different Serialization Approaches for Java | Baeldung
1 month ago - When speed is important for our application, Apache Thrift and Google Protocol Buffers are great candidates for serializing data. Both are more compact and quicker than XML or JSON formats. To sum up, there is often a trade-off between convenience and performance, and serialization proves no ...
Find elsewhere
🌐
GitHub
github.com › ngs-doo › json-benchmark
GitHub - ngs-doo/json-benchmark: JSON benchmark for .NET and Java · GitHub
Gson 2.7 - "Gson is a Java library that can be used to convert Java Objects into their JSON representation" It's known issue that serialization libraries suffer from startup time, since they need to build and cache parsers for types.
🌐
Visionarysoftware
visionarysoftware.solutions › visions › java › serialization › results.html
Results of JMH Performance Comparison for Java Serialization libraries
Gson’s default serialization performs pretty competitively despite its simplistic approach. Johnzon, despite the seeming cleanliness of the code, struggles slowly in all cases with its default serialization for FiveFieldClass and TenFieldClass, losing even to Java in all cases.
🌐
GitHub
github.com › RichardHightower › json-parsers-benchmark › wiki › Serialization-Jackson-vs.-Boon-vs.-Java-Serialization
Serialization Jackson vs. Boon vs. Java Serialization · RichardHightower/json-parsers-benchmark Wiki · GitHub
April 18, 2014 - Boon JSON serialization is much faster than Jackson JSON serialization. java -jar target/microbenchmarks.jar ".*serialization.*" -wi 2 -i 3 -f 2 -t 16
Author: RichardHightower
🌐
Robert-franz
robert-franz.com › 2013 › 12 › 09 › comparing-serialization-performance
Comparing Serialization Performance | block zero
In comparsion with the standard Java serialization it’s times faster! Then there is Protobuf and ByteBuffer. The fastest is Unsafe. The difference between the fastest and the slowest almost factor 100! Even when using Json, this is four times faster than standard java serialization.
🌐
Blogger
rick-hightower.blogspot.com › 2014 › 04 › which-is-faster-java-object.html
Sleepless Dev: Which is faster Java Object Serialization (ObjectOutputStream/ObjectInputStream) or Jackson JSON serialization? The answer will surprise you.
April 18, 2014 - Groovy JSON support and the Boon JSON parser are up to 3x to 5x faster than Jackson at parsing JSON from String and char[], and 2x to 4x faster at parsing byte[]. Groovy JSON support and Boon JSON support are also faster than Jackson at encoding ...
🌐
Medium
medium.com › justeattakeaway-tech › json-serialization-libraries-performance-tests-b54cbb3cccbb
JSON Serialization Libraries Performance Tests | by Israel Abramov | Just Eat Takeaway-tech | Medium
April 18, 2021 - If memory allocation is the biggest key factor for you then SpanJson, NetJson*, System.Text.Json and Protobuf-Net should be considered. In my considerations, I am giving more weight to the data of the first two tables (Serialization and Deserialization success) because most of the serialization/deserialization actions are results with success, so these results will be the performance cost of using those libraries in our web applications most of the time.
🌐
Stack Overflow
stackoverflow.com › questions › 41286218 › java-jackson-large-object-serialization-optimization
json - Java Jackson Large Object Serialization Optimization - Stack Overflow
I am using Jackson to serialize large objects about hundreds of other objects in it. This comes with the performance problems. Most of the custom Serialization class is same as "AmountAsStringSerializer" in the "JSONSerializer" class and all defined static.
🌐
Java Code Geeks
javacodegeeks.com › home › enterprise java
Optimizing Java Serialization - Java vs XML vs JSON vs Kryo vs POF
September 11, 2013 - The results show that Java ... of objects. Conversely, XML and JSON can outperform Java serialization for a small number of objects, but Java serialization is faster for a large number of objects....
🌐
Jsoniter
jsoniter.com
Fastest JSON parser ever
Traditional JSON parsers are slow. Jsoniter Java version could be 3x times faster than jackson/gson/fastjson. If you are doing a lot of log processing or number crunching, but stuck with JSON, you definitely need to consider dsl-json or Jsoniter to save the encoding/decoding cost.
🌐
GitHub
github.com › FasterXML › jackson-docs › wiki › Presentation:-Jackson-Performance
Presentation: Jackson Performance
April 10, 2019 - With "extreme" combinations such as those listed above, use of plain old JSON can meet or exceed performance of fast binary formats such as protobuf, thrift or avro. And with Smile, both processing speed and data sizes can exceed alternatives (as small, even faster!). Although not all combinations discussed above are included, the JVM Serializers benchmark can give some idea for improvements, as it includes results for JSON/Smile, Streaming-API/databind/Afterburner combinations.
Author: FasterXML