You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a25a180
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README(English).md
+21-15Lines changed: 21 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,12 @@
12
12
APIJSON is a JSON Transmission Structure Protocol.
13
13
14
14
You can set any JSON structure and request your server, and the server will return a JSON String with the structure you had set.<br />
15
-
You can get any data with any JSON structure by requesting server just once. It's very convenient and flexible, and does not require a special interface or multiple requests.<br />
15
+
You can get any data with any JSON structure by requesting server just once. It's very convenient and flexible, and does not require a special api or multiple requests.<br />
16
16
It provides additions and deletions, fuzzy search, remote function calls and so on. And you can save duplicate data and improve transmission speed as well!<br />
17
17
18
-
Now you can realize JSON Transmissions without any interface or doc anymore!<br />
19
-
Client developers will no longer be suffered from various error in docs, and don't have to communicate with server developers about interfaces or docs anymore!<br />
20
-
And server developers no longer have to write new interfaces and docs for compatibility with legacy apps! And they will no longer be endlessly disturbed by client developers at any time!
18
+
Now you can realize JSON Transmissions without any api or document anymore!<br />
19
+
Client developers will no longer be suffered from various error in documents, and don't have to communicate with server developers about apis or documents anymore!<br />
20
+
And server developers no longer have to write new apis and documents for compatibility with legacy apps! And they will no longer be endlessly disturbed by client developers at any time!
21
21
22
22
23
23
@@ -291,13 +291,13 @@ Response:
291
291
292
292
Process | Previous way | APIJSON
293
293
-------- | ------------ | ------------
294
-
Transmission | Server developers edit interfaces and update docs, then client developers request server and parse responses according to the docs | Client developers request server and parse responses for their requirements. No inteface! No doc! No communication for any interface or doc between client and server developers!
295
-
Compatibility | Server developers add new interfaces tagged with v2 and update docs | Nothing need to do!
294
+
Transmission | Server developers edit apis and update documents, then client developers request server and parse responses according to the documents | Client developers request server and parse responses for their requirements. No inteface! No document! No communication for any api or document between client and server developers!
295
+
Compatibility | Server developers add new apis tagged with v2 and update documents | Nothing need to do!
296
296
297
297
Client request | Previous way | APIJSON
298
298
-------- | ------------ | ------------
299
-
Requirement | Client developers append key-value pairs to an url for a request in docs | Client developers append JSON to the url for their requirements
300
-
Structure | base_url/lowercase_table_name?key0=value0&key1=value1...<br />¤tUserId=100&loginPassword=1234<br /><br />The currentUserId and loginPassword is only for parts of interfaces | base_url/{TableName0:{key0:value0, key1:value1 ...}, TableName1:{...}...<br />, currentUserId:100, loginPassword:1234}<br /><br />The currentUserId and loginPassword is only for parts of interfaces
299
+
Requirement | Client developers append key-value pairs to an url for a request in documents | Client developers append JSON to the url for their requirements
300
+
Structure | base_url/lowercase_table_name?key0=value0&key1=value1...<br />¤tUserId=100&loginPassword=1234<br /><br />The currentUserId and loginPassword is only for parts of apis | base_url/{TableName0:{key0:value0, key1:value1 ...}, TableName1:{...}...<br />, currentUserId:100, loginPassword:1234}<br /><br />The currentUserId and loginPassword is only for parts of apis
301
301
URL | Different urls for different requests | One url for one method(GET,POST...)
302
302
Key-Value Pair | key=value | key:value
303
303
@@ -308,7 +308,7 @@ Response:
308
308
309
309
Client parse | Previous way | APIJSON
310
310
-------- | ------------ | ------------
311
-
View structure | Search docs or view logs after responses for requests | Just view the requests, and viewing logs after responses for requests is also supported
311
+
View structure | Search documents or view logs after responses for requests | Just view the requests, and viewing logs after responses for requests is also supported
312
312
Operate | Parse JSON String from responses | Parse with JSONResponse or use previous way
313
313
314
314
Client requests for different requirements | Previous way | APIJSON
A list, each item contains<br /> a Moment, a publisher(User)<br /> and a list of top 3 Comments | The Moment must contains an User Object and a Comment Array<br /><br /> base_url/get/moment/list?<br />page=0&count=3&commentCount=3 | [base_url/get/<br >{<br > "[]":{<br > "page":0, <br > "count":3, <br > "Moment":{}, <br > "User":{<br > "id@":"/Moment/userId"<br > },<br > "Comment[]":{<br > "count":3,<br > "Comment":{<br > "momentId@":"[]/Moment/id"<br > }<br > }<br > }<br >}](http://139.196.140.118:8080/get/{"[]":{"page":0,"count":3,"Moment":{},"User":{"id@":"%252FMoment%252FuserId"},"Comment[]":{"count":3,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})
320
-
A list, each item contains<br /> a Moment, the same publisher(User)<br /> and a list of top 3 Comments | Each Moment must contains an User Object and a Comment Array <br /><br /> base_url/get/moment/list?<br />page=0&count=3<br />&commentCount=3&userId=38710 | Here are several ways:<br /> ① Change <br >"Moment":{}, "User":{"id@":"/Moment/userId"}<br > to <br >["Moment":{"userId":38710}, "User":{"id":38710}](http://139.196.140.118:8080/get/{"[]":{"page":0,"count":3,"Moment":{"userId":38710},"User":{"id":38710},"Comment[]":{"count":3,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}}) <br /><br /> ② Or save 4 repeated User by this way<br />[base_url/get/<br >{<br > "User":{<br > "id":38710<br > },<br > "[]":{<br > "page":0,<br > "count":3, <br > "Moment":{<br > "userId":38710<br > }, <br > "Comment[]":{<br > "count":3,<br > "Comment":{<br > "momentId@":"[]/Moment/id"<br > }<br > }<br > }<br >}](http://139.196.140.118:8080/get/{"User":{"id":38710},"[]":{"page":0,"count":3,"Moment":{"userId":38710},"Comment[]":{"count":3,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})<br /><br /> ③ If the User is already obtained, you can also save all repeated User by this way<br />[base_url/get/<br >{<br > "[]":{<br > "page":0,<br > "count":3, <br > "Moment":{<br > "userId":38710<br > },<br > "Comment[]":{<br > "count":3,<br > "Comment":{<br > "momentId@":"[]/Moment/id"<br > }<br > }<br > }<br >}](http://139.196.140.118:8080/get/{"[]":{"page":0,"count":3,"Moment":{"userId":38710},"Comment[]":{"count":3,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})
320
+
A list, each item contains<br /> a Moment, the same publisher(User)<br /> and a list of top 3 Comments | Each Moment must contains an User Object and a Comment Array <br /><br /> base_url/get/moment/list?<br />page=0&count=3<br />&commentCount=3&userId=38710 | Here are several ways:<br /> ① Change <br >"Moment":{}, "User":{"id@":"/Moment/userId"}<br > to <br >["Moment":{"userId":38710}, "User":{"id":38710}](http://139.196.140.118:8080/get/{"[]":{"page":0,"count":3,"Moment":{"userId":38710},"User":{"id":38710},"Comment[]":{"count":3,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}}) <br /><br /> ② Or save repeated Users by this way<br />[base_url/get/<br >{<br > "User":{<br > "id":38710<br > },<br > "[]":{<br > "page":0,<br > "count":3, <br > "Moment":{<br > "userId":38710<br > }, <br > "Comment[]":{<br > "count":3,<br > "Comment":{<br > "momentId@":"[]/Moment/id"<br > }<br > }<br > }<br >}](http://139.196.140.118:8080/get/{"User":{"id":38710},"[]":{"page":0,"count":3,"Moment":{"userId":38710},"Comment[]":{"count":3,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})<br /><br /> ③ If the User is already obtained, you can also save all repeated User by this way<br />[base_url/get/<br >{<br > "[]":{<br > "page":0,<br > "count":3, <br > "Moment":{<br > "userId":38710<br > },<br > "Comment[]":{<br > "count":3,<br > "Comment":{<br > "momentId@":"[]/Moment/id"<br > }<br > }<br > }<br >}](http://139.196.140.118:8080/get/{"[]":{"page":0,"count":3,"Moment":{"userId":38710},"Comment[]":{"count":3,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})
321
321
322
322
Server responses for different requests | Previous way | APIJSON
323
323
-------- | ------------ | ------------
@@ -393,15 +393,21 @@ If the default url is not available, change it to an available one, such as an I
If you have any questions or suggestions, you can [create an issue](https://github.com/TommyLemon/APIJSON/issues) or [send me an e-mail](mailto:tommylemon@qq.com)<br >
406
+
If you fixed some bugs or added some functions, I would greatly appreciate it if you [contribute your code](https://github.com/TommyLemon/APIJSON/pulls)
0 commit comments