I have the JSON looks like the following:
{
"name": "john",
"options": {
"test": 1,
"operation": "op1", // I need to deserialize this option to enum.
...
// any number of options
}
}
and I have the class looks like the following:
public class Info {
public String name;
@JsonTypeInfo(use = JsonTypeInfo.Id.NONE)
public Map<String, Object> options;
}
public enum OperationEnum {OP1, OP2, OP3}
How can I deserialize to options
map operation
like enum
and test
to Integer