Tag

Gson

0 views collected around this technical thread.

macrozheng
macrozheng
Mar 31, 2025 · Backend Development

Why Using isSuccess Can Break JSON Serialization in Java and How to Fix It

This article explains how different Java boolean naming conventions affect JSON serialization across fastjson, Gson, and Jackson, demonstrates the resulting inconsistencies with code examples, and recommends using a plain "success" field with an isSuccess getter to ensure reliable cross‑library behavior.

GsonJSONJackson
0 likes · 7 min read
Why Using isSuccess Can Break JSON Serialization in Java and How to Fix It
macrozheng
macrozheng
Jan 10, 2025 · Backend Development

6 Best Java JSON Parsing Libraries Compared: Jackson, Gson, FastJSON, and More

This article compares six popular Java JSON parsing solutions—Jackson, Gson, FastJSON, JsonPath, org.json, and manual parsing—detailing their features, code examples, advanced options, and pros and cons to help developers choose the right tool for various scenarios.

GsonJSONJackson
0 likes · 13 min read
6 Best Java JSON Parsing Libraries Compared: Jackson, Gson, FastJSON, and More
Java Tech Enthusiast
Java Tech Enthusiast
Jan 5, 2025 · Backend Development

Six Common JSON Parsing Methods in Java

Java developers can parse JSON using six popular approaches—Jackson for high‑performance, annotation‑driven serialization; Gson for a lightweight, easy‑to‑use API; FastJSON for speed; JsonPath for XPath‑style nested extraction; org.json for simple utility; or manual parsing for full control—each suited to different performance and complexity needs.

GsonJSONJackson
0 likes · 9 min read
Six Common JSON Parsing Methods in Java
Code Ape Tech Column
Code Ape Tech Column
May 17, 2024 · Backend Development

Migrating from Fastjson to Gson: Practical Guide, Pitfalls and Solutions

This article documents a month‑long effort to replace Fastjson with Gson in Java projects, analyzing security vulnerabilities, comparing performance and features of Fastjson, Jackson and Gson, and providing detailed migration steps, code examples, and solutions to common issues such as date handling, SpringBoot integration, Swagger compatibility and numeric type conversion.

GsonJSONJava
0 likes · 19 min read
Migrating from Fastjson to Gson: Practical Guide, Pitfalls and Solutions
macrozheng
macrozheng
Feb 22, 2024 · Backend Development

Why Using isSuccess Can Break JSON Serialization in Java

This article explains how different Java JSON libraries handle boolean getter naming, shows code examples of serialization results with fastjson, Gson, and Jackson, and recommends using a plain "success" field with an isSuccess() getter to avoid runtime bugs.

GsonJSON serializationJackson
0 likes · 7 min read
Why Using isSuccess Can Break JSON Serialization in Java
Java Architect Essentials
Java Architect Essentials
Feb 21, 2023 · Backend Development

Performance Benchmark of Common Java JSON Libraries Using JMH

This article benchmarks the serialization and deserialization performance of four popular Java JSON libraries—Gson, Fastjson, Jackson, and Json‑lib—using JMH, analyzes the results across different operation counts, and provides guidance on selecting the most suitable library for high‑performance applications.

GsonJMHJSON
0 likes · 11 min read
Performance Benchmark of Common Java JSON Libraries Using JMH
Code Ape Tech Column
Code Ape Tech Column
Dec 21, 2022 · Backend Development

Migrating from Fastjson to Gson: Lessons Learned and Best Practices

This article documents a month‑long effort to replace Fastjson with Gson in Java projects, analyzing security vulnerabilities, comparing performance and features of Fastjson, Jackson, and Gson, and providing detailed migration steps, code examples, and pitfalls to avoid for large‑scale backend systems.

GsonJSONJava
0 likes · 21 min read
Migrating from Fastjson to Gson: Lessons Learned and Best Practices
Java Architect Essentials
Java Architect Essentials
Oct 17, 2022 · Backend Development

Performance Benchmark of Common Java JSON Libraries (Gson, FastJson, Jackson, Json-lib)

This article presents a JMH‑based performance comparison of four popular Java JSON libraries—Gson, FastJson, Jackson, and Json‑lib—covering their Maven dependencies, utility wrappers, a realistic Person model, serialization and deserialization benchmarks, and analysis of the results to guide library selection.

GsonJSONJackson
0 likes · 15 min read
Performance Benchmark of Common Java JSON Libraries (Gson, FastJson, Jackson, Json-lib)
Selected Java Interview Questions
Selected Java Interview Questions
Dec 18, 2021 · Backend Development

Deep Copy in Java: Multiple Implementation Methods

This article explains the difference between shallow and deep copying in Java and provides five practical techniques—including constructor copying, overriding clone(), Apache Commons Lang serialization, Gson serialization, and Jackson serialization—complete with code examples and test cases to demonstrate each approach.

GsonJacksonJava
0 likes · 8 min read
Deep Copy in Java: Multiple Implementation Methods
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 11, 2021 · Fundamentals

Understanding Java's transient Keyword: Definition, Conventions, Usage Scenarios, and Serialization Behavior

This article explains the transient keyword in Java, covering its definition, the rules that govern its use, practical examples with Gson serialization, the impact on object fields during serialization, and how Externalizable can override its behavior, providing a comprehensive guide for developers.

ExternalizableGsonJava
0 likes · 10 min read
Understanding Java's transient Keyword: Definition, Conventions, Usage Scenarios, and Serialization Behavior
Code Ape Tech Column
Code Ape Tech Column
Dec 2, 2020 · Backend Development

FastJson: Performance, Popularity, and Issues – A Comparative Study with Jackson and Gson

This article examines Alibaba's FastJson library, comparing its parsing speed and popularity against Jackson and Gson, presents benchmark results, highlights code defects and unresolved issues, and concludes with recommendations for using Jackson over FastJson in Java backend projects.

GsonJSONJackson
0 likes · 7 min read
FastJson: Performance, Popularity, and Issues – A Comparative Study with Jackson and Gson
Architect's Tech Stack
Architect's Tech Stack
May 28, 2020 · Backend Development

FastJson: What It Is, Performance Comparison, Popularity Issues, and Why to Abandon It

The article introduces Alibaba's FastJson library, presents a benchmark showing it is only modestly faster than Jackson, discusses its limited popularity and numerous unresolved issues, and concludes that projects should prefer Jackson and gradually drop FastJson in favor of more reliable JSON parsers.

BackendGsonJSON parsing
0 likes · 7 min read
FastJson: What It Is, Performance Comparison, Popularity Issues, and Why to Abandon It
Top Architect
Top Architect
May 6, 2020 · Backend Development

FastJson: Speed Claims, Popularity, and Why It Should Be Abandoned

The article examines Alibaba's FastJson library, presenting performance tests against Jackson and Gson, revealing modest speed gains, low adoption in Maven, numerous unresolved issues, and ultimately recommending developers switch to Jackson for JSON processing in Java projects.

BackendGsonJSON
0 likes · 5 min read
FastJson: Speed Claims, Popularity, and Why It Should Be Abandoned
Java Captain
Java Captain
Jun 27, 2019 · Backend Development

Performance Benchmark of Common Java JSON Libraries Using JMH

Using JMH, this article benchmarks the serialization and deserialization performance of four popular Java JSON libraries—Gson, Fastjson, Jackson, and Json-lib—by testing various scenarios with a complex Person model, analyzing results, and providing guidance on selecting the most suitable library for high‑performance applications.

GsonJMHJSON
0 likes · 13 min read
Performance Benchmark of Common Java JSON Libraries Using JMH
Beike Product & Technology
Beike Product & Technology
Jun 14, 2019 · Mobile Development

Handling Type Mismatches and Heterogeneous List Parsing with Retrofit and Gson in Android

This article explains why Retrofit + Gson parsing can fail when server‑sent fields differ from client definitions or when lists contain heterogeneous item types, and demonstrates how to customize TypeAdapters and use @JsonAdapter to gracefully handle these scenarios in Android applications.

AndroidGsonHeterogeneous List
0 likes · 9 min read
Handling Type Mismatches and Heterogeneous List Parsing with Retrofit and Gson in Android