|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value=TYPE) @Retention(value=RUNTIME) public @interface JsonIgnoreProperties
Annotation that can be used to either suppress serialization of properties (during serialization), or ignore processing of JSON properties read (during deserialization).
Example:
// to prevent specified fields from being serialized or deserialized
// (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)
Only applicable to classes, not for properties (getters, setters, fields).
| Optional Element Summary | |
|---|---|
boolean |
ignoreUnknown
Property that defines whether it is ok to just ignore any unrecognized properties during deserialization. |
String[] |
value
Names of properties to ignore. |
public abstract String[] value
public abstract boolean ignoreUnknown
Does not have any effect on serialization.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||