com.fasterxml.jackson.annotation

Annotation Type JsonInclude



  • @Target(value={ANNOTATION_TYPE,METHOD,FIELD,TYPE,PARAMETER})
    @Retention(value=RUNTIME)
    public @interface JsonInclude
    Annotation used to indicate when value of the annotated property (when used for a field, method or constructor parameter), or all properties of the annotated class, is to be serialized. Without annotation property values are always included, but by using this annotation one can specify simple exclusion rules to reduce amount of properties to write out.
    Since:
    2.0
    • Element Detail

      • value

        public abstract JsonInclude.Include value
        Inclusion rule to use for instances (values) of types (Classes) or properties annotated.
        Default:
        com.fasterxml.jackson.annotation.JsonInclude.Include.ALWAYS
      • content

        public abstract JsonInclude.Include content
        Inclusion rule to use for entries ("content") of annotated Maps; defaults to JsonInclude.Include.ALWAYS.
        Since:
        2.5
        Default:
        com.fasterxml.jackson.annotation.JsonInclude.Include.ALWAYS

Copyright © 2014-2015 FasterXML. All Rights Reserved.