Skip to content

kewne/jackson-datatype-hal

Repository files navigation

jackson-datatype-hal

A Jackson module for handling HAL

Configuration

This requires registering two modules in the ObjectMapper:

objectMapper.registerModule(new HalModule());
objectMapper.registerModule(new UriTemplateModule());

Usage

Serialization and deserialization are based on the HalResource class:

HalResource resource = objectMapper.readValue(halJsonString, HalResource.class);

HalRel nextRel = resource.getRel("next");
HalLink nextLink = nextRel.getSingleLink();

List<HalLink> itemLinks = resource.getRel("items")
                            .getMultipleLinks();

About

A Jackson module for handling HAL

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages