@Target(value={ANNOTATION_TYPE,TYPE,METHOD,CONSTRUCTOR,FIELD}) @Retention(value=RUNTIME) public @interface JsonIncludeProperties
Example:
// to only include specified fields from being serialized or deserialized // (i.e. only include in JSON output; or being set even if they were included) @JsonIncludeProperties({ "internalId", "secretKey" })
Annotation can be applied both to classes and to properties. If used for both, actual set will be union of all includes: that is, you can only add properties to include, not remove or override. So you can not remove properties to include using per-property annotation.
public abstract String[] value
Copyright © 2008–2024 FasterXML. All rights reserved.