FasterXML / jackson-modules-java8

Set of support modules for Java 8 datatypes (Optionals, date/time) and features (parameter names)
Apache License 2.0
401 stars 117 forks source link

Allow JDK8 Optional to use contentConverter #97

Closed sdavids13 closed 5 years ago

sdavids13 commented 5 years ago

The @JsonDeserialize and @JsonSerialize should allow a contentConverter to operate on the class inside the wrapped Java Optional class. Right now the only support is for using converter but you end up writing twice the amount of Converters if you need to support both Optional and Non-Optional bindings.

cowtowncoder commented 5 years ago

@sdavids13 I am not sure I follow why twice the amount would be needed. Can you give an example?

cowtowncoder commented 5 years ago

This may be valid, but I think I'd just need an example to show intended usage.