diff --git a/src/main/java/com/blade/kit/json/BeanSerializer.java b/src/main/java/com/blade/kit/json/BeanSerializer.java index 4ada657e7..9d825f58a 100755 --- a/src/main/java/com/blade/kit/json/BeanSerializer.java +++ b/src/main/java/com/blade/kit/json/BeanSerializer.java @@ -42,8 +42,9 @@ public static Object serialize(SerializeMapping serializeMapping, Object bean) t } if (bean instanceof Map) { - Map map = (Map) bean; - map.forEach((Object key, Object value) -> { + Map beanMap = (Map) bean; + Map map = new HashMap(beanMap.size()); + beanMap.forEach((Object key, Object value) -> { try { map.put(key, serialize(serializeMapping, value)); } catch (Exception e) {