Search before asking
Describe the bug
i have a class containing a field of an enum type. The data is fetched from an api that can add further possible enum values at any point. I want to guard my implementation by using the JsonEnumDefaultValue.
During the deserialization of an unknown value, instead of the annotated default, a different instance of this enum is returned.
Version Information
2.16
Reproduction
https://github.com/dominik-henning/jackson-databind-enum-deserialization-reproducer
i created a projected containing a test class which shows my usecase and setup.
Expected behavior
When an value is encountered which does not match to a annotated JsonProperty, i would expect that the JsonEnumDefaultValue is returned.
Additional context
The real world example is different, but the project boils the problem down to the bare minimum.
Search before asking
Describe the bug
i have a class containing a field of an enum type. The data is fetched from an api that can add further possible enum values at any point. I want to guard my implementation by using the JsonEnumDefaultValue.
During the deserialization of an unknown value, instead of the annotated default, a different instance of this enum is returned.
Version Information
2.16
Reproduction
https://github.com/dominik-henning/jackson-databind-enum-deserialization-reproducer
i created a projected containing a test class which shows my usecase and setup.
Expected behavior
When an value is encountered which does not match to a annotated JsonProperty, i would expect that the JsonEnumDefaultValue is returned.
Additional context
The real world example is different, but the project boils the problem down to the bare minimum.