Multiple setter cause deserialization failure.
class MandrillMessage
public void setTags(List<String> tags)
public void setTags(final String... tags)
public static class MandrillMessageMixIn extends MandrillMessage {
@Override
@JsonProperty("tags")
public void setTags(List<String> tags) {
super.setTags(tags);
}
}
ObjectMapper mapper = new ObjectMapper();
mapper.addMixIn(MandrillMessage.class, MandrillMessageMixIn.class);
MandrillMessage message = mapper.readValue(a-json-string, MandrillMessage.class);