Hypertext Application Language
Hypertext Application Language (HAL) is an Internet Draft (a "work in progress") standard convention for defining hypermedia such as links to external resources within JSON or XML code. The standard was initially proposed on June 2012 specifically for use with JSON[1] and has since become available in two variations, each specific to JSON or XML. The two associated MIME types are media type: application/hal+xml and media type: application/hal+json.[2]
HAL was created to be simple to use and easily applicable across different domains by avoiding the need to impose any requirements on how the project be structured. Maintaining this minimal impact approach, HAL has enabled developers to create general-purpose libraries which can be easily incorporated on any API that uses HAL.[1]
APIs that adopt HAL are generally more appealing to developers because it simplifies the use of open source libraries and makes it possible to interact with the API using JSON or XML. The alternative would be having to develop a proprietary format which in turn forces developers to learn how to use yet another foreign format.[3]
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 depreciation and content negotiation.[3]
See also
References
- 1 2 "JSON Hypertext Application Language" (PDF). Network Working Group (Internet-Draft). 6-7-2012. Retrieved 23 July 2014. Check date values in:
|date=
(help) - ↑ Richardson, Leonard; Ruby, Mike Amundsen ; foreword by Sam (2013). "7". RESTful Web APIs (First edition. ed.). Sebastopol, CA: O'Reilly. ISBN 978-1-4493-5806-8.
- 1 2 Kelly, Mike (2011-06-13). "HAL - Hypertext Application Language A lean hypermedia type". Retrieved 23 July 2014.