diff --git a/APIJSONORM/README.md b/APIJSONORM/README.md
index 0cb431e27..3ad562453 100644
--- a/APIJSONORM/README.md
+++ b/APIJSONORM/README.md
@@ -1,6 +1,6 @@
-# APIJSONORM [](https://jitpack.io/#Tencent/APIJSON) [
](https://deepwiki.com/Tencent/APIJSON)
-腾讯 [APIJSON](https://github.com/Tencent/APIJSON) ORM 库,可通过 Maven, Gradle 等远程依赖。
-Tencent [APIJSON](https://github.com/Tencent/APIJSON) ORM library for remote dependencies with Maven, Gradle, etc.
+# APIJSONORM [](https://jitpack.io/#APIJSON/APIJSON) [
](https://deepwiki.com/APIJSON/APIJSON)
+[APIJSON](https://github.com/APIJSON/APIJSON) ORM 库,可通过 Maven, Gradle 等远程依赖。
+[APIJSON](https://github.com/APIJSON/APIJSON) ORM library for remote dependencies with Maven, Gradle, etc.
### Maven
#### 1. 在 pom.xml 中添加 JitPack 仓库
@@ -19,9 +19,9 @@ Tencent [APIJSON](https://github.com/Tencent/APIJSON) ORM library for remote dep
#### 2. Add the APIJSON dependency to pom.xml
```xml
- com.github.Tencent
+ com.github.APIJSON
APIJSON
- LATEST
+ latest
```
@@ -45,7 +45,7 @@ Tencent [APIJSON](https://github.com/Tencent/APIJSON) ORM library for remote dep
#### 2. Add the APIJSON dependency in one of your modules(such as `app`)
```gradle
dependencies {
- implementation 'com.github.Tencent:APIJSON:latest'
+ implementation 'com.github.APIJSON:APIJSON:latest'
}
```
@@ -54,7 +54,7 @@ Tencent [APIJSON](https://github.com/Tencent/APIJSON) ORM library for remote dep
### FASTJSON 2
#### Code
-https://github.com/Tencent/APIJSON/tree/fastjson2
+https://github.com/APIJSON/APIJSON/tree/fastjson2
#### Maven
https://mvnrepository.com/artifact/com.github.linushp/zikai-apijson/1.0
diff --git a/APIJSONORM/pom.xml b/APIJSONORM/pom.xml
index 391319beb..41ccd10b0 100644
--- a/APIJSONORM/pom.xml
+++ b/APIJSONORM/pom.xml
@@ -3,9 +3,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.github.Tencent
+ com.github.APIJSON
APIJSON
- 8.0.0
+ 10.0.0
jar
APIJSONORM
@@ -21,6 +21,12 @@
+
+ junit
+ junit
+ 4.13.2
+ test
+
diff --git a/APIJSONORM/src/main/java/apijson/JSON.java b/APIJSONORM/src/main/java/apijson/JSON.java
index c31170c44..3f13dc8b6 100755
--- a/APIJSONORM/src/main/java/apijson/JSON.java
+++ b/APIJSONORM/src/main/java/apijson/JSON.java
@@ -1,4 +1,4 @@
-/*Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
+/*Copyright (C) 2026 the APIJSON group. All rights reserved.
This source code is licensed under the Apache License Version 2.0.*/
@@ -674,4 +674,18 @@ public static String getString(Map map, String key) {
return value.toString();
}
+
+ public static Object getFromObjOrArr(Object parent, String k) {
+ if (parent instanceof Map, ?>) {
+ return ((Map) parent).get(k);
+ }
+
+ if (parent instanceof List>) {
+ int j = Integer.valueOf(k);
+ return ((List>) parent).get(j);
+ }
+
+ return null;
+ }
+
}
diff --git a/APIJSONORM/src/main/java/apijson/JSONCreator.java b/APIJSONORM/src/main/java/apijson/JSONCreator.java
index fcabe2fe0..79395a86e 100755
--- a/APIJSONORM/src/main/java/apijson/JSONCreator.java
+++ b/APIJSONORM/src/main/java/apijson/JSONCreator.java
@@ -1,4 +1,4 @@
-/*Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
+/*Copyright (C) 2026 the APIJSON group. All rights reserved.
This source code is licensed under the Apache License Version 2.0.*/
diff --git a/APIJSONORM/src/main/java/apijson/JSONList.java b/APIJSONORM/src/main/java/apijson/JSONList.java
index 0aa448fcb..8130f63a7 100644
--- a/APIJSONORM/src/main/java/apijson/JSONList.java
+++ b/APIJSONORM/src/main/java/apijson/JSONList.java
@@ -1,4 +1,4 @@
-/*Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
+/*Copyright (C) 2026 the APIJSON group. All rights reserved.
This source code is licensed under the Apache License Version 2.0.*/
diff --git a/APIJSONORM/src/main/java/apijson/JSONMap.java b/APIJSONORM/src/main/java/apijson/JSONMap.java
index 0bf0b6825..03c9642c6 100755
--- a/APIJSONORM/src/main/java/apijson/JSONMap.java
+++ b/APIJSONORM/src/main/java/apijson/JSONMap.java
@@ -1,4 +1,4 @@
-/*Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
+/*Copyright (C) 2026 the APIJSON group. All rights reserved.
This source code is licensed under the Apache License Version 2.0.*/
@@ -109,19 +109,32 @@ public static boolean isTableArray(String key) {
public static String KEY_USER_ID = "userId";
public static String KEY_USER_ID_IN = KEY_USER_ID + "{}";
+ default String getIdKey() {
+ return KEY_ID;
+ }
+ default String getIdInKey() {
+ return KEY_ID_IN;
+ }
+ default String getUserIdKey() {
+ return KEY_USER_ID;
+ }
+ default String getUserIdInKey() {
+ return KEY_USER_ID_IN;
+ }
+
/**set "id":id in Table layer
* @param id
* @return
*/
default JSONMap setId(Long id) {
- return puts(KEY_ID, id);
+ return puts(getIdKey(), id);
}
/**set "id{}":[] in Table layer
* @param list
* @return
*/
default JSONMap setIdIn(List