Update README.md
This commit is contained in:
parent
8beee234d4
commit
e2398750dd
279
README.md
279
README.md
@ -1,146 +1,145 @@
|
||||
# APIJSON
|
||||
A Functional JSON Format Protocal.
|
||||
<p># APIJSON<br />
|
||||
A Functional JSON Format Protocal.</p>
|
||||
|
||||
You can set any JSON structure and your server will return a JSON String with the structure you had set like this:
|
||||
<p>You can set any JSON structure and your server will return a JSON String with the structure you had set like this:</p>
|
||||
|
||||
## Request:
|
||||
{
|
||||
"[]": { //request an array
|
||||
"page": 1, //array condition
|
||||
"count": 2,
|
||||
"User": { //request an object form the table named User
|
||||
"range": 1, //object condition
|
||||
"sex": 0
|
||||
},
|
||||
"work": {
|
||||
"userId": “/User/id” //rely path with default parent path,starts from the same level object path
|
||||
}
|
||||
"Comment[]": { //request an array named Comment
|
||||
"page": 0,
|
||||
"count": 3,
|
||||
"Comment": {
|
||||
"workId": “[]/Work/id” //full rely path
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
{<br />
|
||||
"[]": { //request an array<br />
|
||||
"page": 1, //array condition<br />
|
||||
"count": 2, <br />
|
||||
"User": { //request an object form the table named User<br />
|
||||
"range": 1, //object condition<br />
|
||||
"sex": 0 <br />
|
||||
},<br />
|
||||
"work": {<br />
|
||||
"userId": “/User/id” //rely path with default parent path,starts from the same level object path<br />
|
||||
}<br />
|
||||
"Comment[]": { //request an array named Comment<br />
|
||||
"page": 0,<br />
|
||||
"count": 3,<br />
|
||||
"Comment": {<br />
|
||||
"workId": “[]/Work/id” //full rely path<br />
|
||||
}<br />
|
||||
},<br />
|
||||
}<br />
|
||||
}</p>
|
||||
|
||||
## Response:
|
||||
{
|
||||
"[]":{
|
||||
"0":{
|
||||
"User":{
|
||||
"picture":"",
|
||||
"id":"38710",
|
||||
"sex":"0",
|
||||
"phone":"1300038710",
|
||||
"name":"Name-38710",
|
||||
"head":"http://www.tooopen.com/view/38710.html"
|
||||
},
|
||||
"Work":{
|
||||
"id":470,
|
||||
"title":"Title-470",
|
||||
"content":"This is a Content...-470",
|
||||
"userId":38710,
|
||||
"picture":"http://www.tooopen.com/view/470.html"
|
||||
},
|
||||
"Comment[]":{
|
||||
"0":{
|
||||
"Comment":{
|
||||
"id":4,
|
||||
"parentId":0,
|
||||
"workId":470,
|
||||
"userId":310,
|
||||
"targetUserId":14604,
|
||||
"content":"This is a Content...-4",
|
||||
"targetUserName":"targetUserName-14604",
|
||||
"userName":"userName-93781"
|
||||
}
|
||||
},
|
||||
"1":{
|
||||
"Comment":{
|
||||
"id":22,
|
||||
"parentId":221,
|
||||
"workId":470,
|
||||
"userId":332,
|
||||
"targetUserId":5904,
|
||||
"content":"This is a Content...-22",
|
||||
"targetUserName":"targetUserName-5904",
|
||||
"userName":"userName-11679"
|
||||
}
|
||||
},
|
||||
"2":{
|
||||
"Comment":{
|
||||
"id":47,
|
||||
"parentId":4,
|
||||
"workId":470,
|
||||
"userId":10,
|
||||
"targetUserId":5477,
|
||||
"content":"This is a Content...-47",
|
||||
"targetUserName":"targetUserName-5477",
|
||||
"userName":"userName-80271"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"1":{
|
||||
"User":{
|
||||
"picture":"",
|
||||
"id":"70793",
|
||||
"sex":"0",
|
||||
"phone":"1300070793",
|
||||
"name":"Name-70793",
|
||||
"head":"http://www.tooopen.com/view/70793.html"
|
||||
},
|
||||
"Work":{
|
||||
"id":170,
|
||||
"title":"Title-73",
|
||||
"content":"This is a Content...-73",
|
||||
"userId":70793,
|
||||
"picture":"http://www.tooopen.com/view/73.html"
|
||||
},
|
||||
"Comment[]":{
|
||||
"0":{
|
||||
"Comment":{
|
||||
"id":44,
|
||||
"parentId":0,
|
||||
"workId":170,
|
||||
"userId":7073,
|
||||
"targetUserId":6378,
|
||||
"content":"This is a Content...-44",
|
||||
"targetUserName":"targetUserName-6378",
|
||||
"userName":"userName-88645"
|
||||
}
|
||||
},
|
||||
"1":{
|
||||
"Comment":{
|
||||
"id":54,
|
||||
"parentId":0,
|
||||
"workId":170,
|
||||
"userId":3,
|
||||
"targetUserId":62122,
|
||||
"content":"This is a Content...-54",
|
||||
"targetUserName":"targetUserName-62122",
|
||||
"userName":"userName-82381"
|
||||
}
|
||||
},
|
||||
"2":{
|
||||
"Comment":{
|
||||
"id":99,
|
||||
"parentId":44,
|
||||
"workId":170,
|
||||
"userId":793,
|
||||
"targetUserId":7166,
|
||||
"content":"This is a Content...-99",
|
||||
"targetUserName":"targetUserName-7166",
|
||||
"userName":"userName-22949"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
{<br />
|
||||
"[]":{<br />
|
||||
"0":{<br />
|
||||
"User":{<br />
|
||||
"picture":"",<br />
|
||||
"id":"38710",<br />
|
||||
"sex":"0",<br />
|
||||
"phone":"1300038710",<br />
|
||||
"name":"Name-38710",<br />
|
||||
"head":"http://www.tooopen.com/view/38710.html"<br />
|
||||
},<br />
|
||||
"Work":{<br />
|
||||
"id":470,<br />
|
||||
"title":"Title-470",<br />
|
||||
"content":"This is a Content...-470",<br />
|
||||
"userId":38710,<br />
|
||||
"picture":"http://www.tooopen.com/view/470.html"<br />
|
||||
},<br />
|
||||
"Comment[]":{<br />
|
||||
"0":{<br />
|
||||
"Comment":{<br />
|
||||
"id":4,<br />
|
||||
"parentId":0,<br />
|
||||
"workId":470,<br />
|
||||
"userId":310,<br />
|
||||
"targetUserId":14604,<br />
|
||||
"content":"This is a Content...-4",<br />
|
||||
"targetUserName":"targetUserName-14604",<br />
|
||||
"userName":"userName-93781"<br />
|
||||
}<br />
|
||||
},<br />
|
||||
"1":{<br />
|
||||
"Comment":{<br />
|
||||
"id":22,<br />
|
||||
"parentId":221,<br />
|
||||
"workId":470,<br />
|
||||
"userId":332,<br />
|
||||
"targetUserId":5904,<br />
|
||||
"content":"This is a Content...-22",<br />
|
||||
"targetUserName":"targetUserName-5904",<br />
|
||||
"userName":"userName-11679"<br />
|
||||
}<br />
|
||||
},<br />
|
||||
"2":{<br />
|
||||
"Comment":{<br />
|
||||
"id":47,<br />
|
||||
"parentId":4,<br />
|
||||
"workId":470,<br />
|
||||
"userId":10,<br />
|
||||
"targetUserId":5477,<br />
|
||||
"content":"This is a Content...-47",<br />
|
||||
"targetUserName":"targetUserName-5477",<br />
|
||||
"userName":"userName-80271"<br />
|
||||
}<br />
|
||||
}<br />
|
||||
}<br />
|
||||
},<br />
|
||||
"1":{<br />
|
||||
"User":{<br />
|
||||
"picture":"",<br />
|
||||
"id":"70793",<br />
|
||||
"sex":"0",<br />
|
||||
"phone":"1300070793",<br />
|
||||
"name":"Name-70793",<br />
|
||||
"head":"http://www.tooopen.com/view/70793.html"<br />
|
||||
},<br />
|
||||
"Work":{<br />
|
||||
"id":170,<br />
|
||||
"title":"Title-73",<br />
|
||||
"content":"This is a Content...-73",<br />
|
||||
"userId":70793,<br />
|
||||
"picture":"http://www.tooopen.com/view/73.html"<br />
|
||||
},<br />
|
||||
"Comment[]":{<br />
|
||||
"0":{<br />
|
||||
"Comment":{<br />
|
||||
"id":44,<br />
|
||||
"parentId":0,<br />
|
||||
"workId":170,<br />
|
||||
"userId":7073,<br />
|
||||
"targetUserId":6378,<br />
|
||||
"content":"This is a Content...-44",<br />
|
||||
"targetUserName":"targetUserName-6378",<br />
|
||||
"userName":"userName-88645"<br />
|
||||
}<br />
|
||||
},<br />
|
||||
"1":{<br />
|
||||
"Comment":{<br />
|
||||
"id":54,<br />
|
||||
"parentId":0,<br />
|
||||
"workId":170,<br />
|
||||
"userId":3,<br />
|
||||
"targetUserId":62122,<br />
|
||||
"content":"This is a Content...-54",<br />
|
||||
"targetUserName":"targetUserName-62122",<br />
|
||||
"userName":"userName-82381"<br />
|
||||
}<br />
|
||||
},<br />
|
||||
"2":{<br />
|
||||
"Comment":{<br />
|
||||
"id":99,<br />
|
||||
"parentId":44,<br />
|
||||
"workId":170,<br />
|
||||
"userId":793,<br />
|
||||
"targetUserId":7166,<br />
|
||||
"content":"This is a Content...-99",<br />
|
||||
"targetUserName":"targetUserName-7166",<br />
|
||||
"userName":"userName-22949"<br />
|
||||
}<br />
|
||||
}<br />
|
||||
}<br />
|
||||
}<br />
|
||||
}<br />
|
||||
}</p>
|
||||
|
||||
|
||||
|
||||
APIJSON, let interfaces go to hell!
|
||||
<p>APIJSON, let interfaces go to hell! <br />
|
||||
</p>
|
||||
|
Loading…
Reference in New Issue
Block a user