Tagged articles
7 articles
Page 1 of 1
Architecture Digest
Architecture Digest
Sep 30, 2025 · Backend Development

Why Does FastJSON Call isChinaName() During Serialization? Deep Dive & Fix

This article investigates a NullPointerException caused by FastJSON invoking the isChinaName() method during serialization, explains the underlying JavaBeanSerializer mechanisms, demonstrates debugging steps with code examples, and provides best‑practice guidelines using @JSONField annotations to control serialization behavior.

JSONFieldJava serializationJavaBeanSerializer
0 likes · 7 min read
Why Does FastJSON Call isChinaName() During Serialization? Deep Dive & Fix
Java Backend Technology
Java Backend Technology
Mar 13, 2025 · Backend Development

Why Does FastJSON Invoke isChinaName() During Serialization? Explore the Mechanics

This article analyzes a runtime NullPointerException caused by FastJSON serialization invoking the isChinaName() method, explains the underlying ASM-generated serializer, details how JavaBeanSerializer determines which getters and is‑methods are serialized, and proposes using @JSONField(serialize = false) to control the process.

ASMJSONFieldJava serialization
0 likes · 8 min read
Why Does FastJSON Invoke isChinaName() During Serialization? Explore the Mechanics
Top Architect
Top Architect
Jun 13, 2024 · Backend Development

FastJSON Serialization Mechanics: Why isChinaName() Executes and How to Control Serialized Output

This article analyzes a FastJSON serialization issue where a newly added log line triggered unexpected method calls, explains the underlying ASM‑generated serializer and JavaBeanSerializer logic, demonstrates code examples, outlines common pitfalls such as @JSONField annotations and getter patterns, and proposes best‑practice conventions for reliable backend serialization.

ASMBackendJSONField
0 likes · 9 min read
FastJSON Serialization Mechanics: Why isChinaName() Executes and How to Control Serialized Output
Java Interview Crash Guide
Java Interview Crash Guide
May 9, 2024 · Backend Development

Why Does FastJSON Invoke isChinaName()? Uncovering Hidden Serialization Pitfalls

A seemingly harmless log addition triggered a cascade of FastJSON serialization calls, leading to a NullPointerException caused by the isChinaName() method, and the article walks through the debugging process, explains the underlying serialization mechanics, and proposes a clean solution using @JSONField(serialize=false).

JSONFieldJava serializationdebugging
0 likes · 8 min read
Why Does FastJSON Invoke isChinaName()? Uncovering Hidden Serialization Pitfalls
Java Architect Essentials
Java Architect Essentials
Sep 14, 2023 · Backend Development

Understanding FastJson Serialization: Root Causes of NPE, Method Invocation Rules, and Best‑Practice Code Guidelines

This article reviews a production incident caused by a simple log statement, reconstructs the scenario with a CountryDTO example, analyzes FastJson's ASM‑based serializer internals, explains which getter/is methods are invoked during serialization, and proposes annotation‑driven coding standards to avoid similar bugs.

Code reviewJSONJava serialization
0 likes · 9 min read
Understanding FastJson Serialization: Root Causes of NPE, Method Invocation Rules, and Best‑Practice Code Guidelines
dbaplus Community
dbaplus Community
Dec 5, 2022 · Backend Development

Why a Simple Log Caused FastJSON NPE: Inside JavaBeanSerializer Mechanics

The article recounts a production incident where adding a single log line caused a FastJSON NullPointerException, then reconstructs the scenario, analyzes the JavaBeanSerializer source code, presents serialization flowcharts, demonstrates example code with various @JSONField and @JSONType cases, and proposes coding standards to avoid similar serialization pitfalls.

JSONFieldJava serializationJavaBeanSerializer
0 likes · 9 min read
Why a Simple Log Caused FastJSON NPE: Inside JavaBeanSerializer Mechanics
Selected Java Interview Questions
Selected Java Interview Questions
Nov 4, 2022 · Backend Development

FastJSON Serialization Mechanism: Why isChinaName() Is Invoked and How to Control Method Inclusion

This article analyzes a FastJSON serialization issue caused by an unexpected call to isChinaName(), explains the underlying JavaBeanSerializer workflow, demonstrates how ASM-generated serializers work, and proposes coding conventions using @JSONField to prevent unwanted method execution during JSON conversion.

JSONFieldJava serializationbackend-development
0 likes · 8 min read
FastJSON Serialization Mechanism: Why isChinaName() Is Invoked and How to Control Method Inclusion