ObjectMapper.configure(feature, state) turns a supported Jackson feature on or off on that mapper and returns the same mapper, so calls can be chained. Set shared defaults before the mapper first reads or writes JSON; for behavior needed after that, use an ObjectReader or ObjectWriter scoped to the operation.
What configure() changes
The method accepts a feature and a boolean state. It changes that feature’s enabled state on the existing ObjectMapper; it does not create or replace the mapper. The ObjectMapper API documents overloads for DeserializationFeature, SerializationFeature, JsonParser.Feature, JsonGenerator.Feature, and MapperFeature. See the Jackson 2.13 ObjectMapper API.
The feature family determines what the setting affects:
DeserializationFeaturecontrols how JSON is converted into Java values.SerializationFeaturecontrols how Java values are written as JSON.JsonParser.FeatureandJsonGenerator.Featurecontrol behavior of the parser and generator created by the mapper.MapperFeaturecontrols mapper-wide discovery and interpretation behavior.
When to configure the mapper
Configure a shared mapper during initialization, before its first serialization or deserialization. Jackson’s MapperFeature API describes this as the “configure-then-use” pattern: changes take effect only when made before any serialization or deserialization calls.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →For example, using the SerializationFeature overload documented in the Jackson 2.13 API:
ObjectMapper mapper = new ObjectMapper()
.configure(SerializationFeature.INDENT_OUTPUT, true);
This enables indented output for serialization performed with that mapper. The Jackson Cookbook also demonstrates INDENT_OUTPUT for pretty printing in its JSON recipes in Java.
Rank #2
How to change behavior after the mapper is in use
Do not mutate a shared ObjectMapper after its first read or write. The Jackson 2.15.1 ObjectMapper API warns that changing configuration after first use is not safe and should not be attempted.
Instead, create an operation-scoped reader or writer variant. The deserialization guide documents using ObjectReader.with(...) to apply a setting to one read:
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →ObjectReader reader = mapper.reader()
.with(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS);
MyType value = reader.readValue(json);
Use ObjectReader.with(...) or without(...) for read-specific behavior, and ObjectWriter.with(...) or without(...) for write-specific behavior. These variants avoid changing the shared mapper’s defaults. See the Jackson databind project guide.
Is configure() deprecated?
Deprecation depends on the overload and Jackson release. The Jackson 2.13 API marks configure(MapperFeature, boolean) deprecated and directs users to JsonMapper.builder().configure(...). The 2.15.1 ObjectMapper API also cautions that mutating methods may be removed in Jackson 3 and points toward configuration through MapperBuilder. Check the API for the Jackson version used by your project; do not treat every configure() overload as deprecated based on the status of this one overload.
Rank #4
For mapper-level feature setup in versions whose API provides it, builder configuration follows this form:
JsonMapper mapper = JsonMapper.builder()
.configure(MapperFeature.SOME_FEATURE, true)
.build();
Replace SOME_FEATURE with the specific MapperFeature you need. The builder is an initialization approach; reader and writer variants remain the choice for operation-specific behavior.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
Best Value
Choosing the right configuration approach
| Approach | Scope | When to use it | API direction |
|---|---|---|---|
ObjectMapper.configure(...) |
Mapper defaults | During setup, before the first read or write | Mutating mapper API; consult the documentation for the project’s Jackson version |
ObjectReader.with(...) / without(...) |
A read operation or reader variant | When deserialization needs a scoped override | Reader-based configuration |
ObjectWriter.with(...) / without(...) |
A write operation or writer variant | When serialization needs a scoped override | Writer-based configuration |
JsonMapper.builder().configure(...) |
Mapper defaults established during construction | For the deprecated MapperFeature overload in the Jackson 2.13 API and builder-oriented configuration |
Builder API; migration direction for Jackson 3 noted in the 2.15.1 API |
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

