mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复JSONUtil序列化和反序列化预期的结果不一致问题
This commit is contained in:
@@ -171,6 +171,12 @@ public class JSONValueMapper {
|
||||
return new JSONObject(object, jsonConfig);
|
||||
}
|
||||
|
||||
// pr#3507
|
||||
// Class类型保存类名
|
||||
if (object instanceof Class) {
|
||||
return ((Class<?>) object).getName();
|
||||
}
|
||||
|
||||
// 枚举类保存其字符串形式(4.0.2新增)
|
||||
if (object instanceof Enum
|
||||
// Java内部类不做转换
|
||||
|
Reference in New Issue
Block a user