From 01c198a678938831a41c47941ddd808da5544330 Mon Sep 17 00:00:00 2001 From: TommyLemon <1184482681@qq.com> Date: 2024年5月26日 16:54:30 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E5=BC=80=E6=BA=90?= =?UTF-8?q?=E6=8C=87=E5=8D=97=E9=92=88=E6=8A=A5=E5=91=8A=EF=BC=8CAPIJSON?= =?UTF-8?q?=20Java=20=E7=89=88=E5=B7=B2=E7=BB=8F=E6=98=AF=E5=9B=BD?= =?UTF-8?q?=E5=86=85=E9=A1=B6=E7=BA=A7=E3=80=81=E5=9B=BD=E9=99=85=E4=B8=80?= =?UTF-8?q?=E6=B5=81=E7=9A=84=20Java=20=E5=BC=80=E6=BA=90=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/Tencent/APIJSON/issues/518 --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index f37bea636..6016a70af 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,10 @@ https://www.bilibili.com/video/BV1yv411p7Y4 wecom-temp-377bbd0daf5aed716baf7ebcb003d94c +### 根据开源指南针报告,APIJSON Java 版已经是国内顶级、国际一流的 Java 开源项目了 +https://github.com/Tencent/APIJSON/issues/518 +image +
From 2c6c012d1619f66e71d30f6a857d92d1762eceaa Mon Sep 17 00:00:00 2001 From: TommyLemon Date: 2025年3月15日 21:09:26 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=89=AB=E6=8F=8F=E9=85=8D=E7=BD=AE=20yaml?= =?UTF-8?q?=20=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APIJSONORM/src/main/java/.DS_Store | Bin 0 -> 6148 bytes APIJSONORM/src/main/java/apijson/.DS_Store | Bin 0 -> 6148 bytes github/Tencent/APIJSON.yml | 13 +++++++++++++ 3 files changed, 13 insertions(+) create mode 100644 APIJSONORM/src/main/java/.DS_Store create mode 100644 APIJSONORM/src/main/java/apijson/.DS_Store create mode 100644 github/Tencent/APIJSON.yml diff --git a/APIJSONORM/src/main/java/.DS_Store b/APIJSONORM/src/main/java/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..528de0a948ed6bf56a376f49d5ca46714b673271 GIT binary patch literal 6148 zcmeHK%Sr=55UkdKfn0L*IKSW@3?Y6&ejq|X6xoQP=RNsd`Lt9&2!@Rp!HZNwcg^&4 z&9Zga-UeW+kKG-x1Td#N;>*L-{M>zFSCug$op-!rkKuFkHoWX7)t3{_y}<)s@r38^ z{NXWgy-ZV93P=GdAO)m=6!@hA-g{~DMWUhzE~o%@f34I3_Yfv!oJ}YBge5(wT2n*9*tQq{C|XuzIr9gkte@-ru4e))N(_fD|}a z;5xTU@BjDoALjpal6F!+3j8YtY_{I4SA3=Ft&^AYUfbwfy4M`&Zd?b2A=)u9+A%lY ej&GwV>zc25-V4XXpfewIqJ9Qk7nv0JYXy6ドル`W3eT literal 0 HcmV?d00001 diff --git a/APIJSONORM/src/main/java/apijson/.DS_Store b/APIJSONORM/src/main/java/apijson/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..982963e0dde3593b490f7aed8418d642c7b17a36 GIT binary patch literal 6148 zcmeHK%}T>S5Z-O8O({YS3Oz1(Em&KX7B3;z7cim+m70*E!8BXa)Er77XMG``#OHBl zcLNr47O^w1`_1oe_JiyXV~o4Y@R%{1F=jzS-`~9F)2r+(grS zV((wbB=e(WnyP{*oI=X|ZIpyEcjYn(7pm6N0jp)TCU4ドルF>JNuqF&Le$yJ9u!_qyU_ zaJF8ztb@a&^Q*~AJWJ%8rjrBPO7;wv@D7Su&8wFtu}q%8Q)ZW0gv0 Q<$!b%p=run4ezeeuowniob#j- literal 0 HcmV?d00001 diff --git a/github/Tencent/APIJSON.yml b/github/Tencent/APIJSON.yml new file mode 100644 index 000000000..e9c40e3e0 --- /dev/null +++ b/github/Tencent/APIJSON.yml @@ -0,0 +1,13 @@ +tosr_no: + +account_mappings: + caohao-go: smallhowcao + +opensource_repository_information: + tencentopen_url: https://github.com/Tencent/APIJSON + tencentopen_name: APIJSON + status: ongoing + owner: smallhowcao + follower: smallhowcao + internal_id: + internal_url: From 05e5d8bb7a4d05e066a9a5b862764fdbe7df9456 Mon Sep 17 00:00:00 2001 From: TommyLemon Date: 2025年3月15日 21:21:50 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Document-English.md | 6 +++--- Document.md | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Document-English.md b/Document-English.md index fa1785dd5..187239c11 100644 --- a/Document-English.md +++ b/Document-English.md @@ -4,12 +4,12 @@ Methods | URL | Request | Response ------------ | ------------ | ------------ | ------------ -**GET**:
A general way to get data.
You can use dev tools to make edits in a web browser. | base_url/get/ | {
TableName:{
//Add contiditions here.
}
}

Eg. To get a Moment with `id = 235`:
{
"Moment":{
"id":235
}
} | {
TableName:{
...
},
"code":200,
"msg":"success"
}
Eg.
{
"Moment":{
"id":235,
"userId":38710,
"content":"APIJSON,let interfaces and documents go to hell !"
},
"code":200,
"msg":"success"
} +**GET**:
A general way to get data.
You can use dev tools to make edits in a web browser. | base_url/get/ | {
TableName:{
//Add contiditions here.
}
}

Eg. To get a Moment with `id = 235`:
{
"Moment":{
"id":235
}
} | {
TableName:{
...
},
"code":200,
"msg":"success"
}
Eg.
{
"Moment":{
"id":235,
"userId":38710,
"content":"APIJSON is the real-Time coding-free, powerful and secure ORM."
},
"code":200,
"msg":"success"
} **HEAD**:
A general way to get counts.
You can use dev tools to make edits in a web browser. | base_url/head/ | {
TableName:{
...
}
}
{...} are conditions.

Eg. Get the number of Moments posted by the user with `id = 38710`:
{
"Moment":{
"userId":38710
}
} | {
TableName:{
"code":200,
"msg":"success",
"count":10
},
"code":200,
"msg":"success"
}
Eg.
{
"Moment":{
"code":200,
"msg":"success",
"count":10
},
"code":200,
"msg":"success"
} **GETS**:
Get data with high security and confidentiality.
Eg. bank accounts, birth date. | base_url/gets/ | You need to add `"tag":tag` with the same level of `Moment:{}`. Others are the same as **GET**. | Same as **GET**. **HEADS**:
Get counts of confidential data(eg. bank account).| base_url/heads/ | You need to add `"tag":tag` with the same level of `Moment:{}`. Others are the same as **HEAD**. | Same as **HEAD**. -**POST**:
Add new data. | base_url/post/ | {
TableName:{
...
},
"tag":tag
}
The id in {...} is generated automatically when table is built and can’t be set by the user.

Eg. A user with `id = 38710` posts a new Moment:
{
"Moment":{
"userId":38710,
"content":"APIJSON,let interfaces and documents go to hell !"
},
"tag":"Moment"
} | {
TableName:{
"code":200,
"msg":"success",
"id":38710
},
"code":200,
"msg":"success"
}
Eg.
{
"Moment":{
"code":200,
"msg":"success",
"id":120
},
"code":200,
"msg":"success"
} -**PUT**:
Make changes to a specific item.
Only change the part sent to server. | base_url/put/ | {
TableName:{
"id":id,
...
},
"tag":tag
}
You can also add multiple id as `id{}`.

Eg. Make changes to Moment's content with id= 235:
{
"Moment":{
"id":235,
"content":"APIJSON,let interfaces and documents go to hell !"
},
"tag":"Moment"
} | Same as **POST**. +**POST**:
Add new data. | base_url/post/ | {
TableName:{
...
},
"tag":tag
}
The id in {...} is generated automatically when table is built and can’t be set by the user.

Eg. A user with `id = 38710` posts a new Moment:
{
"Moment":{
"userId":38710,
"content":"APIJSON is the real-Time coding-free, powerful and secure ORM."
},
"tag":"Moment"
} | {
TableName:{
"code":200,
"msg":"success",
"id":38710
},
"code":200,
"msg":"success"
}
Eg.
{
"Moment":{
"code":200,
"msg":"success",
"id":120
},
"code":200,
"msg":"success"
} +**PUT**:
Make changes to a specific item.
Only change the part sent to server. | base_url/put/ | {
TableName:{
"id":id,
...
},
"tag":tag
}
You can also add multiple id as `id{}`.

Eg. Make changes to Moment's content with id= 235:
{
"Moment":{
"id":235,
"content":"APIJSON is the real-Time coding-free, powerful and secure ORM."
},
"tag":"Moment"
} | Same as **POST**. **DELETE**:
Delete data. | base_url/delete/ | {
TableName:{
"id":id
},
"tag":tag
}
You can also add multiple id as `id{}`.

Or Delete contents with multiple id:
{
"Comment":{
"id{}":[100,110,120]
},
"tag":"Comment[]"
} | {
TableName:{
"code":200,
"msg":"success",
"id[]":[100,110,120]
"count":3
},
"code":200,
"msg":"success"
}
Eg.
{
"Comment":{
"code":200,
"msg":"success",
"id[]":[100,110,120],
"count":3
},
"code":200,
"msg":"success"
} **Note**:
diff --git a/Document.md b/Document.md index fefcd5eae..1d2392777 100644 --- a/Document.md +++ b/Document.md @@ -27,7 +27,7 @@ https://github.com/Tencent/APIJSON
{
 "User":{
 "id":38710
- }
+ }
 }
 
@@ -64,10 +64,10 @@ https://github.com/Tencent/APIJSON 请求:
{
 "[]":{
-  "count":3,       //只要3个
-  "User":{
-   "@column":"id,name" //只要id,name这两个字段
-  }
+ "count":3, //只要3个
+ "User":{
+ "@column":"id,name" //只要id,name这两个字段
+ }
 }
 }
 
@@ -153,14 +153,14 @@ https://github.com/Tencent/APIJSON 请求:
{
 "[]":{ //请求一个数组
- "page":0,           //数组条件
+ "page":0, //数组条件
 "count":2,
- "Moment":{           //请求一个名为Moment的对象
- "content$":"%a%"     //对象条件,搜索content中包含a的动态
+ "Moment":{ //请求一个名为Moment的对象
+ "content$":"%a%" //对象条件,搜索content中包含a的动态
 },
 "User":{
-   "id@":"/Moment/userId",    //User.id = Moment.userId 缺省引用赋值路径,从所处容器的父容器路径开始
- "@column":"id,name,head"   //指定返回字段
+ "id@":"/Moment/userId", //User.id = Moment.userId 缺省引用赋值路径,从所处容器的父容器路径开始
+ "@column":"id,name,head" //指定返回字段
 },
 "Comment[]":{ //请求一个名为Comment的数组,并去除Comment包装
 "count":2,
@@ -182,7 +182,7 @@ https://github.com/Tencent/APIJSON
 "id":15,
 "userId":70793,
 "date":1486541171000,
- "content":"APIJSON is a JSON Transmission Structure Protocol...",
+ "content":"APIJSON is a JSON Transmission Structure Protocol...",
 "praiseUserIdList":[
 82055,
 82002,
@@ -375,14 +375,14 @@ https://github.com/Tencent/APIJSON
 
 ### 

3.1 操作方法

- 方法及说明 | URL | Request | Response + 方法及说明 | URL | Request | Response ------------ | ------------ | ------------ | ------------ -GET:
普通获取数据,
可用浏览器调试 | base_url/get/ | {
TableName:{
...
}
}
{...}内为限制条件

例如获取一个 id = 235 的 Moment:
[{
"Moment":{
"id":235
}
}](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fget&type=JSON&json={"Moment"%3A{"id"%3A235}})
后端校验通过后自动解析为 SQL 并执行:
`SELECT * FROM Moment WHERE id=235 LIMIT 1` | {
TableName:{
...
},
"code":200,
"msg":"success"
}
例如
{
"Moment":{
"id":235,
"userId":38710,
"content":"APIJSON,let interfaces and documents go to hell !"
},
"code":200,
"msg":"success"
} +GET:
普通获取数据,
可用浏览器调试 | base_url/get/ | {
TableName:{
...
}
}
{...}内为限制条件

例如获取一个 id = 235 的 Moment:
[{
"Moment":{
"id":235
}
}](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fget&type=JSON&json={"Moment"%3A{"id"%3A235}})
后端校验通过后自动解析为 SQL 并执行:
`SELECT * FROM Moment WHERE id=235 LIMIT 1` | {
TableName:{
...
},
"code":200,
"msg":"success"
}
例如
{
"Moment":{
"id":235,
"userId":38710,
"content":"APIJSON is the real-Time coding-free, powerful and secure ORM."
},
"code":200,
"msg":"success"
} HEAD:
普通获取数量,
可用浏览器调试 | base_url/head/ | {
TableName:{
...
}
}
{...}内为限制条件

例如获取一个 id = 38710 的 User 所发布的 Moment 总数:
[{
"Moment":{
"userId":38710
}
}](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fhead&type=JSON&json={"Moment"%3A{"userId"%3A38710}})
后端校验通过后自动解析为 SQL 并执行:
`SELECT count(*) FROM Moment WHERE userId=38710 LIMIT 1` | {
TableName:{
"code":200,
"msg":"success",
"count":10
},
"code":200,
"msg":"success"
}
例如
{
"Moment":{
"code":200,
"msg":"success",
"count":10
},
"code":200,
"msg":"success"
} GETS:
安全/私密获取数据,
用于获取钱包等
对安全性要求高的数据 | base_url/gets/ | 最外层加一个 "tag":tag,例如 ["tag":"Privacy"](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fgets&type=JSON&json={"tag"%3A"Privacy","Privacy"%3A{"id"%3A82001}}),其它同GET | 同GET HEADS:
安全/私密获取数量,
用于获取银行卡数量等
对安全性要求高的数据总数 | base_url/heads/ | 最外层加一个 "tag":tag,例如 ["tag":"Verify"](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fheads&type=JSON&json={"tag"%3A"Verify","Verify"%3A{"phone"%3A13000082001}}),其它同HEAD | 同HEAD -POST:
新增数据 | base_url/post/ | 单个:
{
TableName:{
...
},
"tag":tag
}
{...}中id由后端生成,不能传

例如当前登录用户 38710 发布一个新 Comment:
[{
"Comment":{
"momentId":12,
"content":"APIJSON,let interfaces and documents go to hell !"
},
"tag":"Comment"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fpost&type=JSON&json={"Comment":{"momentId":12,"content":"APIJSON,let%20interfaces%20and%20documents%20go%20to%20hell%20!"},"tag":"Comment"})
后端校验通过后自动解析为 SQL 并执行:
`INSERT INTO Comment(userId,momentId,content) VALUES(38710,12,'APIJSON,let interfaces and documents go to hell !')`

批量:
{
TableName\[]:\[{
...
}, {
...
}
...
],
"tag":tag
}
{...}中id由后端生成,不能传

例如当前登录用户 82001 发布 2 个 Comment:
[{
"Comment[]":[{
"momentId":12,
"content":"APIJSON,let interfaces and documents go to hell !"
}, {
"momentId":15,
"content":"APIJSON is a JSON transmision protocol."
}],
"tag":"Comment:[]"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fpost&type=JSON&json={"Comment[]":[{"momentId":12,"content":"APIJSON,let%20interfaces%20and%20documents%20go%20to%20hell%20!"},{"momentId":15,"content":"APIJSON%20is%20a%20JSON%20transmision%20protocol."}],"tag":"Comment:[]"})
后端校验通过后自动解析为 SQL 并执行:
`INSERT INTO Comment(userId,momentId,content) VALUES(82001,12,'APIJSON,let interfaces and documents go to hell !');`

`INSERT INTO Comment(userId,momentId,content) VALUES(82001,15,'APIJSON is a JSON transmision protocol.');` | 单个:
{
TableName:{
"code":200,
"msg":"success",
"id":38710
},
"code":200,
"msg":"success"
}
例如
{
"Comment":{
"code":200,
"msg":"success",
"id":120
},
"code":200,
"msg":"success"
}

批量:
{
TableName:{
"code":200,
"msg":"success",
"count":5,
"id[]":[1, 2, 3, 4, 5]
},
"code":200,
"msg":"success"
}
例如
{
"Comment":{
"code":200,
"msg":"success",
"count":2,
"id[]":\[1, 2]
},
"code":200,
"msg":"success"
} -PUT:
修改数据,
只修改所传的字段 | base_url/put/ | {
TableName:{
"id":id,
...
},
"tag":tag
}
{...} 中 id 或 id{} 至少传一个

例如当前登录用户 82001 修改 id = 235 的 Moment 的 content:
[{
"Moment":{
"id":235,
"content":"APIJSON,let interfaces and documents go to hell !"
},
"tag":"Moment"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fput&type=JSON&json={"Moment":{"id":235,"content":"APIJSON,let%20interfaces%20and%20documents%20go%20to%20hell%20!"},"tag":"Moment"})
后端校验通过后自动解析为 SQL 并执行:
`UPDATE Moment SET content='APIJSON,let interfaces and documents go to hell !' WHERE id=235 AND userId=82001 LIMIT 1`

批量除了 id{}:\[] 也可类似批量 POST,只是每个 {...} 里面都必须有 id。
"tag":"Comment[]" 对应对象 "Comment":{"id{}":[1,2,3]},表示指定记录全部统一设置;
"tag":"Comment:[]" 多了冒号,对应数组 "Comment[]":[{"id":1},{"id":2},{"id":3}],表示每项单独设置 | 同POST +POST:
新增数据 | base_url/post/ | 单个:
{
TableName:{
...
},
"tag":tag
}
{...}中id由后端生成,不能传

例如当前登录用户 38710 发布一个新 Comment:
[{
"Comment":{
"momentId":12,
"content":"APIJSON is the real-Time coding-free, powerful and secure ORM."
},
"tag":"Comment"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fpost&type=JSON&json={"Comment":{"momentId":12,"content":"APIJSON%20is%20the%20Real-Time%20coding-free,%20powerful%20and%20secure%20ORM."},"tag":"Comment"})
后端校验通过后自动解析为 SQL 并执行:
`INSERT INTO Comment(userId,momentId,content) VALUES(38710,12,'APIJSON is the real-Time coding-free, powerful and secure ORM.')`

批量:
{
TableName\[]:\[{
...
}, {
...
}
...
],
"tag":tag
}
{...}中id由后端生成,不能传

例如当前登录用户 82001 发布 2 个 Comment:
[{
"Comment[]":[{
"momentId":12,
"content":"APIJSON is the real-Time coding-free, powerful and secure ORM."
}, {
"momentId":15,
"content":"APIJSON is a JSON transmision protocol."
}],
"tag":"Comment:[]"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fpost&type=JSON&json={"Comment[]":[{"momentId":12,"content":"APIJSON%20is%20the%20Real-Time%20coding-free,%20powerful%20and%20secure%20ORM."},{"momentId":15,"content":"APIJSON%20is%20a%20JSON%20transmision%20protocol."}],"tag":"Comment:[]"})
后端校验通过后自动解析为 SQL 并执行:
`INSERT INTO Comment(userId,momentId,content) VALUES(82001,12,'APIJSON is the real-Time coding-free, powerful and secure ORM.');`

`INSERT INTO Comment(userId,momentId,content) VALUES(82001,15,'APIJSON is a JSON transmision protocol.');` | 单个:
{
TableName:{
"code":200,
"msg":"success",
"id":38710
},
"code":200,
"msg":"success"
}
例如
{
"Comment":{
"code":200,
"msg":"success",
"id":120
},
"code":200,
"msg":"success"
}

批量:
{
TableName:{
"code":200,
"msg":"success",
"count":5,
"id[]":[1, 2, 3, 4, 5]
},
"code":200,
"msg":"success"
}
例如
{
"Comment":{
"code":200,
"msg":"success",
"count":2,
"id[]":\[1, 2]
},
"code":200,
"msg":"success"
} +PUT:
修改数据,
只修改所传的字段 | base_url/put/ | {
TableName:{
"id":id,
...
},
"tag":tag
}
{...} 中 id 或 id{} 至少传一个

例如当前登录用户 82001 修改 id = 235 的 Moment 的 content:
[{
"Moment":{
"id":235,
"content":"APIJSON is the real-Time coding-free, powerful and secure ORM."
},
"tag":"Moment"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fput&type=JSON&json={"Moment":{"id":235,"content":"APIJSON%20is%20the%20Real-Time%20coding-free,%20powerful%20and%20secure%20ORM."},"tag":"Moment"})
后端校验通过后自动解析为 SQL 并执行:
`UPDATE Moment SET content='APIJSON is the real-Time coding-free, powerful and secure ORM.' WHERE id=235 AND userId=82001 LIMIT 1`

批量除了 id{}:\[] 也可类似批量 POST,只是每个 {...} 里面都必须有 id。
"tag":"Comment[]" 对应对象 "Comment":{"id{}":[1,2,3]},表示指定记录全部统一设置;
"tag":"Comment:[]" 多了冒号,对应数组 "Comment[]":[{"id":1},{"id":2},{"id":3}],表示每项单独设置 | 同POST DELETE:
删除数据 | base_url/delete/ | {
TableName:{
"id":id
},
"tag":tag
}
{...} 中 id 或 id{} 至少传一个,一般只传 id 或 id{}

例如当前登录用户 82001 批量删除 id = 100,110,120 的 Comment:
[{
"Comment":{
"id{}":[100,110,120]
},
"tag":"Comment[]"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fdelete&type=JSON&json={"Comment":{"id{}":[100,110,120]},"tag":"Comment[]"})
后端校验通过后自动解析为 SQL 并执行:
`DELETE FROM Comment WHERE id IN(100,110,120) AND userId=82001 LIMIT 3` | {
TableName:{
"code":200,
"msg":"success",
"id[]":[100,110,120]
"count":3
},
"code":200,
"msg":"success"
}
例如
{
"Comment":{
"code":200,
"msg":"success",
"id[]":[100,110,120],
"count":3
},
"code":200,
"msg":"success"
} 以上接口的简单形式:
base_url/{method}/{tag} | GET: 普通获取数据
base_url/get/{tag}

HEAD: 普通获取数量
base_url/head/{tag}

GETS: 安全/私密获取数据
base_url/gets/{tag}

HEADS: 安全/私密获取数量
base_url/heads/{tag}

POST: 新增数据
base_url/post/{tag}

PUT: 修改数据 base_url/put/{tag}

DELETE: 删除数据
base_url/delete/{tag} | 例如安全/私密获取一个 id = 82001 的 Privacy:
[base_url/gets/Privacy/
{"id":82001}](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fgets%2FPrivacy&type=JSON&json={"id"%3A82001})
相当于
[base_url/gets/
{"tag":"Privacy", "Privacy":{"id":82001}}](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fgets&type=JSON&json={"tag"%3A"Privacy","Privacy"%3A{"id"%3A82001}})

例如批量修改 id = 114, 124 的 Comment 的 content:
[base_url/put/Comemnt[]/
{
"id{}":[114,124],
"content":"test multi put"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fput%2FComment[]&type=JSON&json={"id{}"%3A[114,124],"content"%3A"test%20multi%20put"})
相当于
[base_url/put/
{
"tag":"Comment[]",
"Comment":{
"id{}":[114,124],
"content":"test multi put"
}
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fput&type=JSON&json={"tag"%3A"Comment[]","Comment"%3A{"id{}"%3A[114,124],"content"%3A"test%20multi%20put"}}) | 同以上对应的方法 From 71861dd21db8b5561d72207cc1713bfbbeb6c056 Mon Sep 17 00:00:00 2001 From: TommyLemon Date: 2025年3月15日 21:38:50 +0800 Subject: [PATCH 4/5] Delete APIJSON.yml --- github/Tencent/APIJSON.yml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 github/Tencent/APIJSON.yml diff --git a/github/Tencent/APIJSON.yml b/github/Tencent/APIJSON.yml deleted file mode 100644 index e9c40e3e0..000000000 --- a/github/Tencent/APIJSON.yml +++ /dev/null @@ -1,13 +0,0 @@ -tosr_no: - -account_mappings: - caohao-go: smallhowcao - -opensource_repository_information: - tencentopen_url: https://github.com/Tencent/APIJSON - tencentopen_name: APIJSON - status: ongoing - owner: smallhowcao - follower: smallhowcao - internal_id: - internal_url: From 3d48596bb1e38a6e61a25e2ad88a476f5b35e36c Mon Sep 17 00:00:00 2001 From: TommyLemon Date: 2025年3月15日 21:58:33 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README-English.md | 28 ++++++++++++++-------------- README.md | 34 +++++++++++++++++----------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/README-English.md b/README-English.md index cc599efea..a861baf3b 100644 --- a/README-English.md +++ b/README-English.md @@ -17,8 +17,8 @@ This source code is licensed under the Apache License Version 2.0

- - + + @@ -29,20 +29,20 @@ This source code is licensed under the Apache License Version 2.0

- - - + + +

- - + +

- - + +

@@ -90,7 +90,7 @@ Request: ```js { "User":{ - } + } } ``` @@ -127,10 +127,10 @@ Request: ```js { "[]":{ - "count":3, //just get 3 results - "User":{ - "@column":"id,name" //just get ids and names - } + "count":3, //just get 3 results + "User":{ + "@column":"id,name" //just get ids and names + } } } ``` diff --git a/README.md b/README.md index 6016a70af..76cab6e6f 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ This source code is licensed under the Apache License Version 2.0

English - 通用文档 + 通用文档 视频教程 在线体验

- - + + @@ -29,20 +29,20 @@ This source code is licensed under the Apache License Version 2.0

- - - + + +

- - + +

- - + +

@@ -165,15 +165,15 @@ https://github.com/Tencent/APIJSON/wiki * **解决十大痛点** (可帮前后端开发大幅提振开发效率、强力杜绝联调扯皮、巧妙规避文档缺陷、非常节省流量带宽等) * **开发提速很大** (CRUD 零代码热更新全自动,APIJSONBoot 对比 SSM、SSH 等保守估计可提速 20 倍以上) -* **腾讯官方开源** (使用 GitHub、Gitee、工蜂 等平台的官方账号开源,微信公众号、腾讯云+社区 等官方公告) -* **社区影响力大** (GitHub 1W+ Star 在 350W Java 项目中排名前 120,远超 FLAG, BAT 等国内外绝大部分开源项目) +* **腾讯官方开源** (使用 GitHub、Gitee、工蜂 等平台的官方账号开源,微信公众号、腾讯云+社区 等官方公告) +* **社区影响力大** (GitHub 1.7W+ Star 在 400W Java 项目中排名前 110,远超 FLAG, BAT 等国内外绝大部分开源项目) * **多样用户案例** (腾讯内部用户包含 互娱、音乐、云与智慧,外部用户包含 500 强上市公司、数千亿资本国企 等) -* **适用场景广泛** (社交聊天、阅读资讯、影音视频、办公学习 等各种 App、网站、公众号、小程序 等非金融类项目) +* **适用场景广泛** (社交聊天、阅读资讯、影音视频、办公学习 等各种 App、网站、公众号、小程序 等非金融类项目) * **周边生态丰富** (Android, iOS, Web 等各种 Demo、继承 JSON 的海量生态、零代码 接口测试 和 单元测试 工具等) -* **文档视频齐全** (项目介绍、快速上手、安装部署 等后端、前端、客户端的 图文解说、视频教程、代码注释 等) +* **文档视频齐全** (项目介绍、快速上手、安装部署 等后端、前端、客户端的 图文解说、视频教程、代码注释 等) * **功能丰富强大** (增删改查、分页排序、分组聚合、各种条件、各种 JOIN、各种子查询、跨库连表 等零代码实现) * **使用安全简单** (自动增删改查、自动生成文档、自动管理版本、自动控制权限、自动校验参数、自动防 SQL 注入等) -* **灵活定制业务** (在后端编写 远程函数,可以拿到 session、version、当前 JSON 对象 等,然后自定义处理) +* **灵活定制业务** (在后端编写 远程函数,可以拿到 session、version、当前 JSON 对象 等,然后自定义处理) * **高质可靠代码** (代码严谨规范,商业分析软件源伞 Pinpoint 代码扫描报告平均每行代码 Bug 率低至 0.15%) * **兼容各种项目** (协议不限 HTTP,与其它库无冲突,对各类 Web 框架集成友好且提供 SpringBoot, JFinal 的示例) * **工程轻量小巧** (仅依赖 fastjson,Jar 仅 280KB,Java 文件仅 59 个共 13719 行代码,例如 APIJSONORM 4.3.1) @@ -240,7 +240,7 @@ https://github.com/Tencent/APIJSON/issues/36 #### 2.前端上手 可以跳过这个步骤,直接使用 [APIAuto-机器学习HTTP接口工具](https://github.com/TommyLemon/APIAuto) 或 下载客户端App。
-见 [Android](https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-Android) 或 [iOS](https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-iOS) 或 [JavaScript](https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-JavaScript)
+见 [Android](https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-Android) 或 [iOS](https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-iOS) 或 [JavaScript](https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-JavaScript)
### 下载客户端 App @@ -427,7 +427,7 @@ https://github.com/Tencent/APIJSON/blob/master/CONTRIBUTING.md ### 相关推荐 -[APIJSON, 让接口和文档见鬼去吧!](https://my.oschina.net/tommylemon/blog/805459) +[APIJSON, 接口及文档的终结者!](https://my.oschina.net/tommylemon/blog/805459) [仿QQ空间和微信朋友圈,高解耦高复用高灵活](https://my.oschina.net/tommylemon/blog/885787)

AltStyle によって変換されたページ (->オリジナル) /