-
Notifications
You must be signed in to change notification settings - Fork 550
Closed
Labels
Milestone
Description
问题描述
SupportAutoType 模式下嵌套的HashMap 转换失败
环境信息
请填写以下信息:
- OS信息:window
- JDK信息: [e.g.:Openjdk 1.8.0_312]
- 版本信息::Fastjson2 2.0.50
重现步骤
class FormInstance{
String id
Map<String, Object> widgets
}
String str="{"@type":"com.example.FormInstance","id":"jdjdjksjkjskddd111","widgets":{"@type":"java.util.HashMap","_S_SERIAL":"LYBD-20240611-001"}}"
FormInstance formInstance = JSON.parseObject(str, FormInstance.class,Feature.SupportAutoType);
转换后 widgets 为空,
- 使用 JSON.parseObject(str, FormInstance.class,Feature.SupportAutoType);
- FormInstance formInstance = JSON.parseObject(str, FormInstance.class,Feature.SupportAutoType);
- 出现
...错误
转换后 widgets 为空
期待的正确结果
widgets 能够转换为HashMap
附加信息
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
FastJson1.2.83是正常可以支持的
Reactions are currently unavailable