Content deleted Content added
Tom.Reding (talk | contribs) m Fix Category:Pages using citations with accessdate and no URL when perm identifier present (doi|bibcode|arxiv|pmid|jstor|isbn|issn|lccn|oclc|ismn|hdl) (rem access-date) using AWB |
m v2.05b - Bot T20 CW#61 - Fix errors for CW project (Reference before punctuation) |
||
(42 intermediate revisions by 35 users not shown) | |||
Line 1:
{{Short description|Proposed computer definition standard}}
'''Hypertext Application Language''' ('''HAL''') is
HAL was created to be simple to use and easily applicable across different [[___domain (software engineering)|domains]] by avoiding the need to impose any requirements on how the project be structured.
APIs that adopt HAL
== Convention ==
HAL is structured in such a way as to represent elements based on two concepts:
==Example==
General Resource
<syntaxhighlight lang="json">
{
"_links": {
"self": {
"href": "http://example.com/api/book/hal-cookbook"
}
},
"id": "hal-cookbook",
"name": "HAL Cookbook"
}
</syntaxhighlight>
Embedded resource
<syntaxhighlight lang="json">
{
"_links": {
"self": {
"href": "http://example.com/api/book/hal-cookbook"
}
},
"_embedded": {
"author": {
"_links": {
"self": {
"href": "http://example.com/api/author/shahadat"
}
},
"id": "shahadat",
"name": "Shahadat Hossain Khan",
"homepage": "http://author-example.com"
}
},
"id": "hal-cookbook",
"name": "HAL Cookbook"
}
</syntaxhighlight>
Collections
<syntaxhighlight lang="json">
{
"_links": {
"self": {
"href": "http://example.com/api/book/hal-cookbook"
},
"next": {
"href": "http://example.com/api/book/hal-case-study"
},
"prev": {
"href": "http://example.com/api/book/json-and-beyond"
},
"first": {
"href": "http://example.com/api/book/catalog"
},
"last": {
"href": "http://example.com/api/book/upcoming-books"
}
},
"_embedded": {
"author": {
"_links": {
"self": {
"href": "http://example.com/api/author/shahadat"
}
},
"id": "shahadat",
"name": "Shahadat Hossain Khan",
"homepage": "http://author-example.com"
}
},
"id": "hal-cookbook",
"name": "HAL Cookbook"
}
</syntaxhighlight>
==See also==
* [[HATEOAS]]
* [[CURIE]], (or Compact [[URI]])
== References ==
Line 15 ⟶ 91:
==External links==
* [https://tools.ietf.org/html/draft-kelly-json-hal-
[[Category:JSON]]
Line 23 ⟶ 99:
[[Category:XML-based standards]]
[[Category:World Wide Web Consortium standards]]
|