I’ve found what I need. http://chrisjordan.ca/post/50865405944/custom-json-serialization-for-enums-using-jackson.
It was 2 steps.
- Override the toString method of the Reos enum
@Override
public String toString() {
return text;
}
- Annotate with @JsonCreator the fromText method of the Reos enum.
@JsonCreator
public static Reos fromText(String text)
And that’s all.
I hope this could help others facing the same problem.