I am using REST web service/Apache Wink with Jackson 1.6.2. How do I annotate an enum field so that Jackson deserializes it?
public enum
Actually, according to the docs for JsonValue (Jackson 2.3.3):
NOTE: when use for Java enums, one additional feature is
* that value returned by annotated method is also considered to be the
* value to deserialize from, not just JSON String to serialize as.
* This is possible since set of Enum values is constant and it is possible
* to define mapping, but can not be done in general for POJO types; as such,
* this is not used for POJO deserialization.
So for enums, your deserialization will not work using JsonCreator because JsonValue will be used for both serialization and deserialization. One way to do this for enums is using JsonSetter and JsonGetter.