Content deleted Content added
No edit summary |
m →Example: <source lang="json"> |
||
Line 7:
== Convention ==
HAL is structured in such a way as to represent elements based on two concepts: Resources and Links. Resources consist of [[URI]] links, embedded resources, your standard data (be it JSON or XML), and non URI links. Links have a target URI, as well as the name of the link (referred to as 'rel'), as well as optional properties designed to be mindful of deprecation and content negotiation.<ref name="stateless"/>
==Example==
General Resource
<source lang="json">
{
"_links": {
Line 20 ⟶ 21:
"name": "HAL Cookbook"
}
</
Embedded resource
<source lang="json">
{
"_links": {
Line 43 ⟶ 44:
"name": "HAL Cookbook"
}
</
Collections
<source lang="json">
{
"_links": {
"self": {
"href": "
},
"next": {
"href": "
},
"prev": {
"href": "
},
"first": {
"href": "
},
"last": {
"href": "
}
},
Line 68 ⟶ 69:
"_links": {
"self": {
"href": "
}
},
Line 78 ⟶ 79:
"name": "HAL Cookbook"
}
</
==See also==
* [[HATEOAS]]
|