how to ignore a field while desiarilizing in java if its type is not wrong code example
Example: how to ignore a field while desiarilizing in java if its type is not wrong
public class UserAccount implements HasMoney {
@JsonIgnore
private BigDecimal money;
// Other variable declarations, constructors
@Override
@JsonProperty
public BigDecimal getMoney() {
return money;
}
@JsonIgnore
@Override
public void setMoney(final BigDecimal money) {
this.money = money;
}
// Other getters/setters
}