I want to deserialize this json string
{"value":"Y"}
to this object
public class Data {
byte value;
public byte getValue() {
return value;
}
public void setValue(byte value) {
this.value = value;
}
}
ObjectMapper mapper = new ObjectMapper();
Data data = mapper.readValue(js, Data.class);
it works when in json string I put an ascii code {"value":89}
But I want to use char value.
Main problem is that Data class is legacy class, and I can't add @JsonDeserialize
annotation inside it.
Any other option?