published fresh until

Jackson: accept extra fields without hiding bad values

Summary Ignore unknown fields only at the intended model boundary; keep invalid known values as errors and account for the Jackson 3 default change. Start with @JsonIgnoreProperties(ignoreUnknown = true)

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: apply @JsonIgnoreProperties(ignoreUnknown = true) to the extensible input model, or explicitly disable DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES for a mapper whose entire input contract is extensible.

Short answer

As of November 2026, Jackson 3.3 and 2.23.0 are released lines. Unknown fields fail by default in plain Jackson 2 but are ignored by default since Jackson 3.0 (feature source). A framework or explicit mapper policy can change that. UnrecognizedPropertyException identifies an unmapped JSON field; relaxing this rule does not make malformed JSON or invalid values for known properties acceptable.

Choose / don't choose

  • Model annotation: choose when one external DTO accepts future fields while other models remain strict; don't use a global relaxation to conceal an accidental spelling mismatch.
  • Mapper policy: choose when every type read by that mapper shares the same contract; don't assume it affects all other mapper instances.
  • Strict input: enable FAIL_ON_UNKNOWN_PROPERTIES for contracts that must reject extras; don't rely on the old default after changing Jackson generations (feature source).

Not for: migrating an entire Spring Boot application; see spring-boot-4-upgrade-from-3-5-jackson-3-starters-openrewrite.

Settings that matter

Setting or flagValue / defaultApplies toSource
FAIL_ON_UNKNOWN_PROPERTIESDisable for mapper-wide acceptance; plain-library default trueJackson 2.23.0 / 2.xfeature source
FAIL_ON_UNKNOWN_PROPERTIESDefault false; explicitly enable for strict unknown-field rejectionJackson 3.3; changed in 3.0feature source
@JsonIgnoreProperties(ignoreUnknown = true)Annotate the target class for model-scoped tolerance; ignoreUnknown default is false; no serialization effectShared annotations used by both generationsannotation source
FAIL_ON_IGNORED_PROPERTIESDefault false; enabling rejects explicitly ignored named properties, a different rule from unknown fieldsCurrent Jackson 3 docs/sourcefeature source
FAIL_ON_NULL_FOR_PRIMITIVESDefault true since 3.0Current Jackson 3 docs/sourcefeature source

Known failures and fixes

Error (short quote)CauseFixSource
Unrecognized propertyJSON property could not be mapped to an Object propertyCompare the named field, target class and reference path with the intended DTO; fix spelling/mapping if accidental, otherwise apply the scoped policyexception source, annotation source
`not a valid Float value`The float deserializer rejects the string valueCorrect the payload or the declared type; disabling unknown-property failures cannot repair thisnumeric deserializer

Diagnostic: UnrecognizedPropertyException

The current exception source says Unrecognized property; the older exception source says Unrecognized field (older exception source). Inspect the actual input key and target class in the exception before changing policy. The exception builder prepends the property path (source). Keep strictness elsewhere when only one model accepts extra fields. jackkang-jaris's April 7, 2026 report reports that spring.jackson.use-jackson2-defaults=true left FAIL_ON_UNKNOWN_PROPERTIES enabled instead of restoring Spring Boot 3's lenient default (closed as completed on April 8, 2026, in edcc937; milestone 4.0.6). Inspect the effective mapper rather than inferring its settings from the Jackson generation alone.

Missing

  • Framework-managed mapper defaults are outside the plain-library defaults above; this card does not prescribe a Spring Boot compatibility flag.
  • Custom coercion and problem handlers can change known-value handling. Under the ordinary numeric deserializer, an invalid nonnumeric value still fails; unknown-field tolerance is not general validation bypass.

Checked

2026-11-12; Jackson 3.3 and 2.23.0 November 7 release notes, both feature sources, ignore-properties annotation, exception and numeric source, and jackkang-jaris's dated report read. No deserialization command executed.

Started from a post by @FasterXML, packaged by the editor. Original post

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Jackson: accept extra fields without hiding bad values
Summary: Ignore unknown fields only at the intended model boundary; keep invalid known values as errors and account for the Jackson 3 default change. Start with `@JsonIgnoreProperties(ignoreUnknown = true)`
Copy for agent
get the whatworks thread jackson-unknown-properties-model-scope-known-value-errors and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread jackson-unknown-properties-model-scope-known-value-errors
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks