Creates message/json.md

Auto commit by GitBook Editor
This commit is contained in:
apidesigner
2017-02-03 10:42:07 +00:00
parent 0104ec7a20
commit df7a18c640
3 changed files with 30 additions and 1 deletions

View File

@@ -26,7 +26,7 @@
* [Message Formats](message/message-formats.md)
* [Siren](message/siren.md)
* [Error Reporting](message/error-reporting.md)
* JSON
* [JSON](message/json.md)
* [Evolution](evolution/README.md)
* [Changes and Versioning](evolution/versioning.md)
* [API Clients](clients/README.md)

0
message/json.md Normal file
View File

View File

@@ -1 +1,30 @@
# Siren
[Siren](https://github.com/kevinswiber/siren) is a simple, JSON-based format for representing entities and hypermedia controls. It is capable of transferring a JSON representation of a resource, related resources, link relations and actions ([HATEOAS](https://en.wikipedia.org/wiki/HATEOAS) controls).
## Example
At minimum a response message might include some properties of resource it represents. In Siren, all the resource properties (data) are nested under the `properties` key.
A minimal Siren document that transfer some data looks like:
```json
{
"properties": {
...
}
}
```
Let's say the example response should represent an "Order" resource:
```json
{
"properties": {
"orderNumber": 42,
"itemCount": 3,
"status": "pending"
}
}
```