@JsonIgnoreProperties(ignoreUnknown = true)
public static class MessageRS {
private String errorCode;
private String description;
private DATA DATA;
public MessageRS() {
}
public MessageRS(String errorCode, String description, DATA DATA) {
super();
this.errorCode = errorCode;
this.description = description;
this.DATA = DATA;
}
@JsonProperty("errorCode")
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public static class DATA {
private String EMAIL;
public DATA() {
}
public DATA(String eMAIL) {
super();
EMAIL = eMAIL;
}
@JsonProperty("EMAIL")
public String getEMAIL() {
return EMAIL;
}
public void setEMAIL(String eMAIL) {
EMAIL = eMAIL;
}
}
Currently I would need that when the DATA comes with another type it can ignore it or evade that the deserialization is not split by the type of data since it is dynamic and if it comes with the format it can be obtained, but if it comes with a format that does not is the one who defined it ignore it, Is there any Jackson property for this? Thanks
com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of jsonMapperMM.response.LoginRS $ MessageRS $ DATA: no String-argument constructor / factory method to deserialize from String value ('') at [Source: {"headerRS": {"orgMsgId": "msgId", "orgChannelRef": "ChannelReference", "orgChannelId": "", "orgTransactionType": "xxxx", "timestamp": "2018-07-17T12: 49: 10-05: 00 "," errorCode ":" 0 "," errorDesc ":" "}," messageRS ": {" errorCode ":" - 30150 "," description ":" - 680 "," DATA ": ""}}; line: 1, column: 351] (through reference chain: jsonMapperMM.response.LoginRS ["messageRS"] -> jsonMapperMM.response.LoginRS $ MessageRS ["DATA"])