diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/JsonUtil.java b/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/JsonUtil.java index ebffab3..57180e8 100644 --- a/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/JsonUtil.java +++ b/blade-core-tool/src/main/java/org/springblade/core/tool/jackson/JsonUtil.java @@ -803,6 +803,24 @@ public class JsonUtil { } } + /** + * 读取集合 + * + * @param content bytes + * @return 集合 + */ + public static List> readListMap(@Nullable String content) { + if (ObjectUtil.isEmpty(content)) { + return Collections.emptyList(); + } + try { + return getInstance().readValue(content, new TypeReference>>() { + }); + } catch (IOException e) { + throw Exceptions.unchecked(e); + } + } + /** * jackson 的类型转换 *