Tag

Java Serialization

0 views collected around this technical thread.

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.

ASMJSONFieldJava Serialization
0 likes · 9 min read
FastJSON Serialization Mechanics: Why isChinaName() Executes and How to Control Serialized Output
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.

AnnotationsBackend DevelopmentJSON
0 likes · 9 min read
Understanding FastJson Serialization: Root Causes of NPE, Method Invocation Rules, and Best‑Practice Code Guidelines
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.

Backend DevelopmentJSONFieldJava Bean
0 likes · 8 min read
FastJSON Serialization Mechanism: Why isChinaName() Is Invoked and How to Control Method Inclusion