Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fabioricali/json-success-response
A standard JSON API response
https://github.com/fabioricali/json-success-response
java javascript json json-api json-response json-schema nodejs php python response
Last synced: 15 days ago
JSON representation
A standard JSON API response
- Host: GitHub
- URL: https://github.com/fabioricali/json-success-response
- Owner: fabioricali
- License: mit
- Created: 2017-09-08T07:05:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-13T10:07:04.000Z (over 3 years ago)
- Last Synced: 2024-10-27T03:46:23.679Z (2 months ago)
- Topics: java, javascript, json, json-api, json-response, json-schema, nodejs, php, python, response
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Param|Type|Description
-|-|-
success|boolean| true if ok, false if error
code|number| server status code
message|string| server message
result|string, number, boolean, array, object, null| response result
time|string| response time in ISO standard### Example
#### Response ok
```
HTTP/1.1 200 OK
Content-Type: application/json
```
```json
{
"success": true,
"code": 200,
"message": "OK",
"result": 123,
"time": "2017-08-30T09:59:00.846Z"
}
```
#### Response error
```
HTTP/1.1 401 Unauthorized
Content-Type: application/json
```
```json
{
"success": false,
"code": 401,
"message": "Unauthorized",
"result": null,
"time": "2017-08-30T09:59:00.846Z"
}
```### Author
Fabio Ricali### License
MIT