How can I map a simple JSON object {"status" : "successful"} automaticly map to my Java Enum within JAX-RS?
public enum Status {
SUCESSFUL ("successful"),
ERROR ("error");
private String status;
private Status(String status) {
this.status = status;
}
}
If you need further details feel free to ask 🙂
The following
JAXBannotations should do it. (I tested usingJettisonbut I’ve not tried other providers):