|
|
|
@ -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<String, Object>) object)); |
|
|
|
|
} else if (object instanceof JSONArray) { |
|
|
|
|