'Specification of generic type for wrapper class
Is it possible to specify the generic type from Optional or something like JsonNullable to Jackson.
An annotation can be specified without the wrapper class. How can I do that with a wrapper?
public class Bean {
private Optional<Set<String>> foos;
public Optional<Set<String>> getFoos() {
return foos;
}
//@JsonDeserialize(as = LinkedHashSet.class)
public void setFoos(Optional<Set<String>> foos) {
this.foos = foos;
}
}
I would like to use a LinkedHashSet instead of the default HashSet.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
