eclipse-ee4j / eclipse-ee4j/jersey

Automatically serialize/deserialize Java 8 datatype with `jersey-media-json-jackson`

Open
#3,637 1 comment 0 reactions 0 assignees View on GitHub
Type: New Feature
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

As of today, in order to serialize/deserialize the "new" datatypes introduced in Java 8 (e.g. `Optional`), you need to provide a custom `ObjectMapper` (as explained [here](https://jersey.github.io/documentation/latest/media.html#d0e8188)) and register the corresponding Jackson extension for handling those types (i.e. [jackson-modules-java8](https://github.com/FasterXML/jackson-datatype-jdk8) for Jackson < 2.8.5 and [jackson-modules-java8](https://github.com/FasterXML/jackson-modules-java8) for Jackson >= 2.8.5).

I guess it would be nice to provide this functionality out of the box.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.