Reputation: 585
As i read in the documentation:
// (i.e. not include in JSON output; or being set even if they were included)
\@JsonIgnoreProperties({ "internalId", "secretKey" })
// To ignore any unknown properties in JSON input without exception:
\@JsonIgnoreProperties(ignoreUnknown=true)
but how can I ingore both unknown AND given
Upvotes: 1
Views: 814
Reputation: 7894
Assuming I have understood you correctly, you can combine the conditions you want into the same annotation:
@JsonIgnoreProperties(value = { "internalId", "secretKey" }, ignoreUnknown = true)
Upvotes: 4