Skip to content

Commit a3d9c90

Browse files
committed
包含选项范围新增支持传路径,例如 key<>:{ path: "$", value:82001 }
1 parent fca7560 commit a3d9c90

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

APIJSONORM/src/main/java/apijson/orm/AbstractObjectParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public AbstractObjectParser parse(String name, boolean isReuse) throws Exception
255255
key = entry.getKey();
256256

257257
try {
258-
if (key.startsWith("@") || key.endsWith("@")) {
258+
if (key.startsWith("@") || key.endsWith("@") || (key.endsWith("<>") && value instanceof JSONObject)) {
259259
if (onParse(key, value) == false) {
260260
invalidate();
261261
}

APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4487,8 +4487,8 @@ else if (w.startsWith("!")) {
44874487
for (String key : set) {
44884488
value = request.get(key);
44894489

4490-
if (value instanceof Map) {//只允许常规Object
4491-
throw new IllegalArgumentException("不允许 " + key + " 等任何key的value类型为 {JSONObject} !");
4490+
if (key.endsWith("<>") == false && value instanceof Map) {//只允许常规Object
4491+
throw new IllegalArgumentException(table + ":{ " + key + ":value } 中 value 类型错误!除了 key<>:{} 外,不允许 " + key + " 等其它任何 key 对应 value 的类型为 JSONObject {} !");
44924492
}
44934493

44944494
//解决AccessVerifier新增userId没有作为条件,而是作为内容,导致PUT,DELETE出错

0 commit comments

Comments
 (0)