Package org.apache.juneau.bean.hal
@Marshalled types for the
HAL (Hypertext Application Language)
hypermedia format, also covered by
draft-kelly-json-hal-08.
Overview
HAL is a JSON-based hypermedia format used by RESTful APIs to express links and embedded resources alongside the
payload itself. This module provides typed Juneau beans modeling the HAL wire format — no marshaller is needed; the
existing JsonSerializer / JsonParser already produce
and consume application/hal+json. The matching ContentType constant is
org.apache.juneau.http.header.ContentType#APPLICATION_HAL_JSON (in juneau-rest-common).
Bean Classes
HalResource- Top-level HAL resource. Carries_links,_embedded, and arbitrary payload fields.HalLink- HAL Link Object with the 8 spec fields.HalLinkArray-LinkedList<HalLink>used as the multi-link branch inside an_linksmap.HalResourceArray-LinkedList<HalResource>used as the multi-resource branch inside an_embeddedmap.HalLinkOrArraySwap-ObjectSwapthat materializes each_linksvalue as either a singleHalLink(JSON object) or aHalLinkArray(JSON array) per spec.HalResourceOrArraySwap- The_embeddedanalogue.
Example
See Also:
-
ClassesClassDescriptionRepresents a HAL Link Object as defined by draft-kelly-json-hal-08 § 5.Represents a list of
HalLinkobjects.Per-propertyObjectSwapapplied to HAL_linksmaps so that each map entry round-trips as either a singleHalLink(JSON object) or aHalLinkArray(JSON array) per the spec.Represents a HAL Resource Object as defined by draft-kelly-json-hal-08 § 4.Represents a list ofHalResourceobjects.Per-propertyObjectSwapapplied to HAL_embeddedmaps so that each map entry round-trips as either a singleHalResource(JSON object) or aHalResourceArray(JSON array) per the spec.