diff --git a/Document.md b/Document.md index f0833f26..49e6dd3d 100644 --- a/Document.md +++ b/Document.md @@ -313,13 +313,13 @@ Response:
-### 2. Keyswords in URL parameters +### 2. Keywords in URL parameters Functions | Key-value pairs | Examples ------------ | ------------ | ------------ Get data in arrays | `"key[]":{}`
The part after the colon is a JSONObject. *key* is optional. When *key* is the same as the table name , the JSONObject will be in a simplified form. For example, `{Table:{Content}}` will be written as `{Content}`.| [{"User[]":{"User":{}}}](http://apijson.cn:8080/get/{"User[]":{"count":3,"User":{}}})
It is used for getting data from a user. Here, key and tablename are all "User", then
`{"User":{"id", ...}}`
will be written as
`{"id", ...}` Get data that meets specific conditions | `"key{}":[]`
The part after the colon is a JSONArray with conditions inside.| ["id{}":[38710,82001,70793]](http://apijson.cn:8080/get/{"User[]":{"count":3,"User":{"id{}":[38710,82001,70793]}}})
In SQL, this would be `id IN(38710,82001,70793)`.
It means getting data with id equals 38710,82001,70793. - Get data with comparison operation| `"key{}":"condition0,condition1..."`
Conditions can be any SQL comparision operation. Use''to include any non-number characters.| ["id{}":"<=80000,\>90000"](http://apijson.cn:8080/get/{"User[]":{"count":3,"User":{"id{}":"<=80000,\>90000"}}})
In SQL, it'd be
`id<=80000 OR id>90000`,
which means get User array with id\<=80000 \| id>90000 + Get data with comparison operation| `"key{}":"condition0,condition1..."`
Conditions can be any SQL comparison operation. Use''to include any non-number characters.| ["id{}":"<=80000,\>90000"](http://apijson.cn:8080/get/{"User[]":{"count":3,"User":{"id{}":"<=80000,\>90000"}}})
In SQL, it'd be
`id<=80000 OR id>90000`,
which means get User array with id\<=80000 \| id>90000 Get data that contains an element | `"key<>":Object` => `"key<>":[Object]`
*key* must be a JSONArray while *Object* cannot be JSON.| ["contactIdList<\>":38710](http://apijson.cn:8080/get/{"User[]":{"count":3,"User":{"contactIdList<\>":38710}}})
In SQL, this would be
`json_contains(contactIdList,38710)`.
It means find data of the User whose contactList contains 38710. See if it exists |`"key}{@":{`
   `"from":"Table",`
   `"Table":{ ... }`
`}`

}{ means EXISTS.
*key* is the one you want to check.
Here is a *Subquery* in it, see specifications below for more information. | ["id}{@":{
   "from":"Comment",
   "Comment":{
      "momentId":15
   }
}](http://apijson.cn:8080/get/{"User":{"id}{@":{"from":"Comment","Comment":{"momentId":15}}}})
WHERE EXISTS(SELECT * FROM Comment WHERE momentId=15) Include functions in parameters | `"key()":"function (key0,key1...)"`
This will trigger the back-end
`function(JSONObject request, String key0, String key1...)`
to get or testify data.
Use - and + to show the order of priority: analyze key-() > analyze the current object > analyze key() > analyze child object > analyze key+()| ["isPraised()":"isContain(praiseUserIdList,userId)"](http://apijson.cn:8080/get/{"Moment":{"id":301,"isPraised()":"isContain(praiseUserIdList,userId)"}})
This will use function boolean isContain(JSONObject request, String array, String value). In this case, client will get "isPraised":true(In this case, client use function to testify if a user clicked ‘like’ button for a Moment.) diff --git a/README.md b/README.md index acda59c5..f5648039 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ It also allows users to get data more quickly with self-defined form and fewer e #### For getting data: You can get any data by defining the specific information you want and send it to the server.
You can get different types of data by making just one request to the server.
-It's very convenient and flexible, and dosen't require different API endpoints with multiple requests.
+It's very convenient and flexible, and doesn't require different API endpoints with multiple requests.
It provides CRUD(read and write), Fuzzy Search, Remote Function Calls, etc.
You can also save duplicate data, see request history, etc.
@@ -346,8 +346,8 @@ If you have any questions or suggestions, you can [create an issue](https://gith [More APIJSON Users](https://github.com/APIJSON/APIJSON/issues/73) -### Contributers of APIJSON: -[Contributers](/CONTRIBUTING.md) for the APIJSON core project(7 Tencent engineers, 1 Microsoft engineer, 1 Zhihu architect, 1 Bytedance(TikTok) engineer, 1 NetEase engineer, 1 Zoom engineer, 1 YTO Express engineer, 1 Zhilian engineer, 1 UC student、3 SUSTech students, etc.):
+### Contributors of APIJSON: +[Contributors](/CONTRIBUTING.md) for the APIJSON core project(7 Tencent engineers, 1 Microsoft engineer, 1 Zhihu architect, 1 Bytedance(TikTok) engineer, 1 NetEase engineer, 1 Zoom engineer, 1 YTO Express engineer, 1 Zhilian engineer, 1 UC student、3 SUSTech students, etc.):

Screenshot 2026-04-18 at 05 28 48 @@ -365,7 +365,7 @@ https://search.gitee.com/?skin=rec&type=repository&q=apijson&sort=stars_count
-Thanks to all contributers of APIJSON! +Thanks to all contributors of APIJSON!
@@ -383,7 +383,7 @@ APIJSON was shown as a top open source Java projects on OSS Compass [#518](https ### Ecosystem [APIJSON-Demo](https://github.com/APIJSON/APIJSON-Demo) Demo projects with document and SQL files for APIJSON with different programming languages and different frameworks -[A2API](https://github.com/TommyLemon/A2API) AI generate UI once, API view/edit data everytime safely, quickly and stably. Chat agent to HTTP API to safely, quickly and stably add, view, edit or remove data in tables, forms or charts together with A2UI. +[A2API](https://github.com/TommyLemon/A2API) AI generate UI once, API view/edit data every time safely, quickly and stably. Chat agent to HTTP API to safely, quickly and stably add, view, edit or remove data in tables, forms or charts together with A2UI. [apijson-orm](https://github.com/APIJSON/apijson-orm) APIJSON ORM library, Maven, Gradle, etc can be used for dependencies @@ -471,7 +471,7 @@ APIJSON was shown as a top open source Java projects on OSS Compass [#518](https [SpringServer1.2-APIJSON](https://github.com/Airforce-1/SpringServer1.2-APIJSON) The smart Party building server provides interfaces for uploading and downloading files -[apijson_template](https://github.com/abliger/apijson_template) APIJSON Java template, using Gradle to manage dependencie and building apps +[apijson_template](https://github.com/abliger/apijson_template) APIJSON Java template, using Gradle to manage dependency and building apps [api-json-demo](https://gitee.com/hxdwd/api-json-demo) Demo for APIJSON to replace traditional ORM, compated Oracle transactions