Search before asking
Describe the bug
@JsonUnwrapped on Java record components behaves differently between Jackson databind 3.0.x and 3.1.x when the unwrapped value uses a custom ValueDeserializer that implements unwrappingDeserializer(...).
With Jackson databind 3.0.x, the custom unwrapping deserializer receives the expected flattened JSON fields.
With Jackson databind 3.1.x, the custom unwrapping deserializer is still invoked and receives the correct NameTransformer, but the JsonParser content passed to deserialize(...) is an empty object {}. As a result, the unwrapped value cannot be deserialized.
More context is in the reproducer repo: https://github.com/kistlers/jackson-3-unwrapped-regression/blob/main/README.md
Multiple changes were released with 3.1 that relate to JsonUnwrapped, but I cannot se what exactly relates to my issue:
Version Information
3.1.3
Reproduction
I created a full reproducer repo:
https://github.com/kistlers/jackson-3-unwrapped-regression
The Readme describes the full steps of reproduction and a test that works in 3.0.4 and fails in 3.1.3
Expected behavior
This behaviour should still work in 3.1
Additional context
No response
Search before asking
Describe the bug
@JsonUnwrapped on Java record components behaves differently between Jackson databind 3.0.x and 3.1.x when the unwrapped value uses a custom ValueDeserializer that implements unwrappingDeserializer(...).
With Jackson databind 3.0.x, the custom unwrapping deserializer receives the expected flattened JSON fields.
With Jackson databind 3.1.x, the custom unwrapping deserializer is still invoked and receives the correct NameTransformer, but the JsonParser content passed to deserialize(...) is an empty object {}. As a result, the unwrapped value cannot be deserialized.
More context is in the reproducer repo: https://github.com/kistlers/jackson-3-unwrapped-regression/blob/main/README.md
Multiple changes were released with 3.1 that relate to JsonUnwrapped, but I cannot se what exactly relates to my issue:
@JsonUnwrappedprevents checks forDeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES #650@JsonUnwrappedvalues if no properties matched,DeserializationFeature.USE_NULL_FOR_EMPTY_UNWRAPPEDenabled #1497@JsonAnySetterand@JsonUnwrappeddeserialize property twice #1811Version Information
3.1.3
Reproduction
I created a full reproducer repo:
https://github.com/kistlers/jackson-3-unwrapped-regression
The Readme describes the full steps of reproduction and a test that works in 3.0.4 and fails in 3.1.3
Expected behavior
This behaviour should still work in 3.1
Additional context
No response