UnrecognizedPropertyException ☕ Java

com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "x", not marked as ignorable

The JSON contains a field your Java class doesn’t have, and Jackson is configured to fail on unknown properties.

Seen on: Java

Meaning

Default ObjectMapper fails on unknown fields (Spring Boot’s does not). APIs adding new fields break strict clients.

Common causes

  • API added fields
  • Field name differs (snake_case vs camelCase)
  • Typo in @JsonProperty

⚡ Quick fix

  1. Ignore unknown fields: @JsonIgnoreProperties(ignoreUnknown = true) or FAIL_ON_UNKNOWN_PROPERTIES=false
  2. Map names with @JsonProperty / PropertyNamingStrategies.SNAKE_CASE

Detailed fix by platform

Java

  1. mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

How to diagnose

  1. Field — Which name?
  2. Naming — snake_case vs camelCase?

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.