From a8ea4882a8cade7b33378cea121fd9ff05e70bc7 Mon Sep 17 00:00:00 2001 From: richie Date: Wed, 18 Mar 2020 15:43:40 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin.xml | 3 ++- .../plugin/db/es/fun/category/impl/JSONResultStandardize.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin.xml b/plugin.xml index 63903f5..3dd83a2 100644 --- a/plugin.xml +++ b/plugin.xml @@ -3,12 +3,13 @@ com.fr.plugin.db.es.v10 yes - 1.4 + 1.5 10.0 2019-10-25 fanruan.richie [2020-03-11]新增查询请求类型。
[2020-03-07]远程设计序列化问题。
[2020-01-07]修复一个写xml的错误。
diff --git a/src/main/java/com/fr/plugin/db/es/fun/category/impl/JSONResultStandardize.java b/src/main/java/com/fr/plugin/db/es/fun/category/impl/JSONResultStandardize.java index cf6a0b7..702be71 100644 --- a/src/main/java/com/fr/plugin/db/es/fun/category/impl/JSONResultStandardize.java +++ b/src/main/java/com/fr/plugin/db/es/fun/category/impl/JSONResultStandardize.java @@ -1,5 +1,6 @@ package com.fr.plugin.db.es.fun.category.impl; +import com.fanruan.api.util.StringKit; import com.fr.plugin.db.es.fun.ConfigAttribute; import com.fr.plugin.db.es.fun.assist.SimpleDataModel; import com.fr.plugin.db.es.fun.category.ResultStandardize; @@ -28,7 +29,7 @@ public class JSONResultStandardize implements ResultStandardize { @Override public SimpleDataModel result(String text, String script, ConfigAttribute configAttribute, int rowCount) { - Object object = JsonPath.read(text, script); + Object object = JsonPath.read(text, StringKit.isBlank(script) ? "$..*" : script); if (object instanceof LinkedHashMap) { initJSONObject(new TreeMap<>((LinkedHashMap) object)); } else if (object instanceof JSONArray) {