Enum JacksonOption

    • Enum Constant Detail

      • RESPECT_JSONPROPERTY_ORDER

        public static final JacksonOption RESPECT_JSONPROPERTY_ORDER
        Use this option to sort an object's properties according to associated JsonPropertyOrder annotations. Fields and methods without such an annotation are listed after annotated properties.
      • INCLUDE_ONLY_JSONPROPERTY_ANNOTATED_METHODS

        public static final JacksonOption INCLUDE_ONLY_JSONPROPERTY_ANNOTATED_METHODS
        Use this option to ignore all methods that don't have a JsonProperty annotation themselves or in case of getter methods on their associated field. When including non-getter methods with annotated property names, you'll probably want to enable the general Option.FIELDS_DERIVED_FROM_ARGUMENTFREE_METHODS as well, in order to avoid parentheses at the end.
        Since:
        4.21.0
        See Also:
        Option.FIELDS_DERIVED_FROM_ARGUMENTFREE_METHODS
      • IGNORE_PROPERTY_NAMING_STRATEGY

        public static final JacksonOption IGNORE_PROPERTY_NAMING_STRATEGY
        Use this option to skip property name changes according to JsonNaming annotations.
      • ALWAYS_REF_SUBTYPES

        public static final JacksonOption ALWAYS_REF_SUBTYPES
        Use this option to ensure all looked-up subtypes according to @JsonSubTypes annotations are referenced via the central "$defs". This applies to the wrapping schema produced based on @JsonTypeInfo annotations, e.g., with wrapping object/array or additional property.
        Since:
        4.27.0
      • INLINE_TRANSFORMED_SUBTYPES

        public static final JacksonOption INLINE_TRANSFORMED_SUBTYPES
        Use this option to ensure all looked-up subtypes according to @JsonSubTypes annotations are referenced via the central "$defs". This applies to the nested schema inside the wrapping object/array or "allOf" based on @JsonTypeInfo annotations. This can be used to counter-act the Option.DEFINITIONS_FOR_ALL_OBJECTS. Beware: as with every explicit inlining, recursive non-transformed references can result in a stack overflow during schema generation when this option is enabled (similar to Option.INLINE_ALL_SCHEMAS)!
        Since:
        4.30.0
      • SKIP_SUBTYPE_LOOKUP

        public static final JacksonOption SKIP_SUBTYPE_LOOKUP
        Use this option to skip the automatic look-up of subtypes according to @JsonSubTypes annotations.
      • IGNORE_TYPE_INFO_TRANSFORM

        public static final JacksonOption IGNORE_TYPE_INFO_TRANSFORM
        Use this option to skip the transformation according to @JsonTypeInfo annotations (typically used to identify specific subtypes).
      • RESPECT_JSONPROPERTY_REQUIRED

        public static final JacksonOption RESPECT_JSONPROPERTY_REQUIRED
        Use this option to include fields annotated with @JsonProperty(required = true) in the containing type's list of "required" properties.
        Since:
        4.18.0
      • JSONIDENTITY_REFERENCE_ALWAYS_AS_ID

        public static final JacksonOption JSONIDENTITY_REFERENCE_ALWAYS_AS_ID
        Use this option to consider @JsonIdentityReference(alwaysAsId = true) annotations on fields/methods or the type itself.
        Since:
        4.28.0
    • Method Detail

      • values

        public static JacksonOption[] values()
        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 (JacksonOption c : JacksonOption.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static JacksonOption valueOf​(String name)
        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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null