Is FastJson Really Faster? Performance, Popularity, and Why You Might Drop It

This article examines Alibaba's FastJson library, benchmarking its speed against Jackson and Gson, analyzing its limited adoption, exposing unresolved issues, and ultimately recommending a shift to more widely supported JSON parsers for Java projects.

Programmer DD
Programmer DD
Programmer DD
Is FastJson Really Faster? Performance, Popularity, and Why You Might Drop It

Why FastJson?

FastJson is Alibaba's open‑source JSON parsing library that can parse JSON strings, serialize Java beans to JSON, and deserialize JSON back to Java objects. It is popular among Java developers, with speed marketed as its main advantage.

Is It Really Fast?

Without prior research, a simple benchmark was performed comparing FastJson with the widely used Jackson and Google’s Gson. The test ran on JDK 8, an AMD 3700X CPU, and 3200 MHz RAM, converting simple and complex objects to and from strings ten million times. The results (shown in the image) indicate FastJson is about 20% faster than Jackson, while Gson is the slowest.

Although FastJson appears fastest, the test did not cover memory usage or large‑document handling. In modern applications even the slower Gson meets performance needs, and factors like I/O optimization and parallel processing are often more impactful than raw parsing speed.

FastJson Is Not That Popular

FastJson’s Maven Central usage is far lower than that of Jackson and Gson, placing it in a different magnitude of adoption. Discussions on platforms like Zhihu suggest FastJson suffers from lower code quality, with many unresolved issues (over 1,200 reported). Screenshots show numerous open issues and problematic source code, including serious logic errors in date‑format handling that cause incorrect conversions.

Dropping FastJson

In the author’s projects, Spring Boot already uses Jackson for JSON processing to keep dependencies minimal. Some team members still use Gson or FastJson without strict guidelines. Given Jackson’s strong ecosystem and the drawbacks of FastJson, the recommendation is to standardize on Jackson and gradually phase out FastJson.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Javaperformance benchmarkfastjsonGsonJacksonjson-parsingLibrary comparison
Programmer DD
Written by

Programmer DD

A tinkering programmer and author of "Spring Cloud Microservices in Action"

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.