As part of Jackson 2.14, a new set of datatype-specific configuration settings was added, as suggested in JSTEP-7.
The idea is to allow easier configuration of more granular settings that affect specific class of data types: both so that:
Each new configuration type is an Enum that implements DatatypeFeature interface.
Enum
DatatypeFeature
Configuration is handled using either ObjectMapper.Builder (for ObjectMapper defaults) or ObjectReader.with() (and related) methods:
ObjectMapper.Builder
ObjectMapper
ObjectReader.with()
ObjectMapper mapper = JsonMapper.builder() .disable(JsonNodeFeature.READ_NULL_PROPERTIES) .build(); ObjectReader r = mapper.readerFor(MyPojo.class) .with(JsonNodeFeature.READ_NULL_PROPERTIES);
Following DatatypeFeature Enums have been added so far (as of Jackson 2.15)
EnumFeature was added for Enum-specific configuration.
JsonNodeFeature was added for configuring handling of Tree Model (JsonNode values), mostly reading and writing.
JsonNode
There was an error while loading. Please reload this page.