-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Follow up of Unknown Enum Deserialization issues , Map : <Enum,String> #1882
Comments
As per my comments on the issue, you do need to change type to |
We are unable to use EnumMap since the beans are generated through Apache Thrift, which is only allowing Map "HashMap". |
@isuribb then you will probably need a custom key deserializer (or deserializer). |
It seems like |
Thanks All... We went with a custom deserilizer and defaulting to a custom value and it resolved our issue. EnumMap also was not an option due to thrift model is not supporting any custom maps except map and tree map. |
@mawifu true, ordinals are not (for now) supported for keys. But for this issue I I also do think that for Jackson 3.0 I can do something that helps here, that I realized now: it should be possible to map all I will file another issue for that work. Thank you for all the input here. |
Hi
This is a follow up issue from "issue handling unknown/unmapped Enum keys #1859"
Tried using the "READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE " with the JsonEnumDefaultValue annotation. It worked for the type Enum as expected. Then we have another issue where we are using a Map<Enum,String> object in our Bean class which didnot get resolved with above. When tried debugging, noticed the following code is going inside the class, EnumResolver since we a . It would be good if we can handle the same default value handling done in EnumDeserializer class , on this class as well so that we can use the default value we have defined. Appreciate a quick response.. Thank you.
StdKeyDeserializer :
The text was updated successfully, but these errors were encountered: