Skip to content

Commit b541d5c

Browse files
committed
Server:AbstractParser.onArrayParse支持缓存远程函数返回的数组,并减少无效的[{}]和[[]]缓存
1 parent 1a15600 commit b541d5c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

APIJSON-Java-Server/APIJSONLibrary/src/main/java/zuo/biao/apijson/server/AbstractParser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,8 @@ public JSONArray onArrayParse(final JSONObject request, String parentPath, Strin
697697
}
698698
}
699699
*/
700-
if (childKeys != null) {
700+
Object fo = response.isEmpty() ? null : response.get(0); //可能是远程函数返回的,而不是提取 childKeys == null || response.isEmpty()
701+
if (fo instanceof Boolean || fo instanceof Number || fo instanceof String) { //[{}] 和 [[]] 都没意义
701702
putQueryResult(path, response);
702703
}
703704

0 commit comments

Comments
 (0)