Answers for "@jsondeserialize annotation"

0

@jsondeserialize annotation

public enum TypeEnumWithValue {
    TYPE1(1, "Type A"), TYPE2(2, "Type 2");

    private Integer id;
    private String name;

    // standard constructors

    @JsonValue
    public String getName() {
        return name;
    }
}
Posted by: Guest on June-11-2021

Browse Popular Code Answers by Language