Tag

ConstructorOrder

0 views collected around this technical thread.

DaTaobao Tech
DaTaobao Tech
Jun 24, 2022 · Backend Development

Random Fastjson Deserialization Failure Caused by Constructor Order

The article explains that Fastjson sometimes throws a syntax‑error exception when deserializing a JSON list of StewardTipCategory objects because the JVM returns overloaded constructors in nondeterministic order, causing Fastjson to pick the wrong constructor; removing or renaming the ambiguous constructor fixes the issue.

BackendConstructorOrderDebugging
0 likes · 12 min read
Random Fastjson Deserialization Failure Caused by Constructor Order