Package com.fasterxml.jackson.annotation

# Enum JsonFormat.Feature

java.lang.Object
java.lang.Enum<JsonFormat.Feature>
com.fasterxml.jackson.annotation.JsonFormat.Feature

All Implemented Interfaces:
  `Serializable`, `Comparable<JsonFormat.Feature>`, `java.lang.constant.Constable`

Enclosing class:
  `JsonFormat`

public static enum JsonFormat.Feature extends Enum<JsonFormat.Feature>
Set of features that can be enabled/disabled for property annotated. These often relate to specific `SerializationFeature` or `DeserializationFeature`, as noted by entries.

Note that whether specific setting has an effect depends on whether `JsonSerializer` / `JsonDeserializer` being used takes the format setting into account. If not, please file an issue for adding support via issue tracker for package that has handlers (if you know which one; if not, just use `jackson-databind`).

Since:
  2.6

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`ACCEPT_CASE_INSENSITIVE_PROPERTIES`
Override for `MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES`, which allows case-insensitive matching of property names (but NOT values, see `ACCEPT_CASE_INSENSITIVE_VALUES` for that).
`ACCEPT_CASE_INSENSITIVE_VALUES`
Override for `MapperFeature.ACCEPT_CASE_INSENSITIVE_VALUES`, which allows case-sensitive matching of (some) property values, such as `Enum`s.
`ACCEPT_SINGLE_VALUE_AS_ARRAY`
Override for `DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY` which will allow deserialization of JSON non-array values into single-element Java arrays and `Collection`s.
`ADJUST_DATES_TO_CONTEXT_TIME_ZONE`
Override for `DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIMEZONE` that specifies whether context provided timezone `DeserializationContext.getTimeZone()` should be used to adjust Date/Time values on deserialization, even if value itself contains timezone information
`WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS`
Override for `SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS`, similar constraints apply.
`WRITE_DATES_WITH_ZONE_ID`
Override for `SerializationFeature.WRITE_DATES_WITH_ZONE_ID`, similar constraints apply.
`WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED`
Override for `SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED` which will force serialization of single-element arrays and `Collection`s as that single element and excluding array wrapper.
`WRITE_SORTED_MAP_ENTRIES`
Override for `SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS`, enabling of which will force sorting of `Map` keys before serialization.

## Method Summary

Modifier and Type
Method
Description
`static JsonFormat.Feature`
`valueOf(String name)`
Returns the enum constant of this type with the specified name.
`static JsonFormat.Feature[]`
`values()`
Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### ACCEPT_SINGLE_VALUE_AS_ARRAY

public static final JsonFormat.Feature ACCEPT_SINGLE_VALUE_AS_ARRAY
Override for `DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY` which will allow deserialization of JSON non-array values into single-element Java arrays and `Collection`s.

### ACCEPT_CASE_INSENSITIVE_PROPERTIES

public static final JsonFormat.Feature ACCEPT_CASE_INSENSITIVE_PROPERTIES
Override for `MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES`, which allows case-insensitive matching of property names (but NOT values, see `ACCEPT_CASE_INSENSITIVE_VALUES` for that).

Only affects deserialization, has no effect on serialization.

Since:
  2.8

### ACCEPT_CASE_INSENSITIVE_VALUES

public static final JsonFormat.Feature ACCEPT_CASE_INSENSITIVE_VALUES
Override for `MapperFeature.ACCEPT_CASE_INSENSITIVE_VALUES`, which allows case-sensitive matching of (some) property values, such as `Enum`s. Only affects deserialization, has no effect on serialization.

Since:
  2.10

### WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS

public static final JsonFormat.Feature WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS
Override for `SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS`, similar constraints apply.

### WRITE_DATES_WITH_ZONE_ID

public static final JsonFormat.Feature WRITE_DATES_WITH_ZONE_ID
Override for `SerializationFeature.WRITE_DATES_WITH_ZONE_ID`, similar constraints apply.

### WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED

public static final JsonFormat.Feature WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED
Override for `SerializationFeature.WRITE_SINGLE_ELEM_ARRAYS_UNWRAPPED` which will force serialization of single-element arrays and `Collection`s as that single element and excluding array wrapper.

### WRITE_SORTED_MAP_ENTRIES

public static final JsonFormat.Feature WRITE_SORTED_MAP_ENTRIES
Override for `SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS`, enabling of which will force sorting of `Map` keys before serialization.

### ADJUST_DATES_TO_CONTEXT_TIME_ZONE

public static final JsonFormat.Feature ADJUST_DATES_TO_CONTEXT_TIME_ZONE
Override for `DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIMEZONE` that specifies whether context provided timezone `DeserializationContext.getTimeZone()` should be used to adjust Date/Time values on deserialization, even if value itself contains timezone information

NOTE: due to limitations of "old" JDK date/time types (that is, `Date` and `Calendar`), this setting is only applicable to `Joda` and `Java 8 date/time` values, but not to `java.util.Date` or `java.util.Calendar`.

Since:
  2.8

## Method Details

### values

public static JsonFormat.Feature[] values()
Returns an array containing the constants of this enum type, in the order they are declared.

Returns:
  an array containing the constants of this enum type, in the order they are declared

### valueOf

public static JsonFormat.Feature 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