Enum JsonSerialize.Inclusion

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALWAYS
      Deprecated.
      Value that indicates that properties are to be always included, independent of value
      DEFAULT_INCLUSION
      Deprecated.
      Pseudo-value that is used to indicate "use whatever is default used at higher level".
      NON_DEFAULT
      Deprecated.
      Value that indicates that only properties that have values that differ from default settings (meaning values they have when Bean is constructed with its no-arguments constructor) are to be included.
      NON_EMPTY
      Deprecated.
      Value that indicates that only properties that have values that values that are null or what is considered empty are not to be included.
      NON_NULL
      Deprecated.
      Value that indicates that only properties with non-null values are to be included.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static JsonSerialize.Inclusion valueOf​(java.lang.String name)
      Deprecated.
      Returns the enum constant of this type with the specified name.
      static JsonSerialize.Inclusion[] values()
      Deprecated.
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • ALWAYS

        public static final JsonSerialize.Inclusion ALWAYS
        Deprecated.
        Value that indicates that properties are to be always included, independent of value
      • NON_NULL

        public static final JsonSerialize.Inclusion NON_NULL
        Deprecated.
        Value that indicates that only properties with non-null values are to be included.
      • NON_DEFAULT

        public static final JsonSerialize.Inclusion NON_DEFAULT
        Deprecated.
        Value that indicates that only properties that have values that differ from default settings (meaning values they have when Bean is constructed with its no-arguments constructor) are to be included. Value is generally not useful with Maps, since they have no default values; and if used, works same as ALWAYS.
      • NON_EMPTY

        public static final JsonSerialize.Inclusion NON_EMPTY
        Deprecated.
        Value that indicates that only properties that have values that values that are null or what is considered empty are not to be included. Emptiness is defined for following type:
        • For Collections and Maps, method isEmpty() is called;
        • For Java arrays, empty arrays are ones with length of 0
        • For Java Strings, length() is called, and return value of 0 indicates empty String
        For other types, non-null values are to be included.
      • DEFAULT_INCLUSION

        public static final JsonSerialize.Inclusion DEFAULT_INCLUSION
        Deprecated.
        Pseudo-value that is used to indicate "use whatever is default used at higher level".
        Since:
        2.3
    • Method Detail

      • values

        public static JsonSerialize.Inclusion[] values()
        Deprecated.
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (JsonSerialize.Inclusion c : JsonSerialize.Inclusion.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static JsonSerialize.Inclusion valueOf​(java.lang.String name)
        Deprecated.
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null