You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"}}"
问题描述
SupportAutoType 模式下嵌套的HashMap 转换失败
环境信息
请填写以下信息:
重现步骤
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 为空,
...
错误转换后 widgets 为空
期待的正确结果
widgets 能够转换为HashMap
附加信息
如果你还有其他需要提供的信息,可以在这里填写(可以提供截图、视频等)。
FastJson1.2.83是正常可以支持的
The text was updated successfully, but these errors were encountered: