-
Notifications
You must be signed in to change notification settings - Fork 53
Multimap serializer doesn't work with non-String keys, even if it seems like they should. #13
Comments
I'll take a look at this, but from memory it should be the same behaviour then Maps: you need a custom key deserializer for this to work. The |
Is there any particular reason for that? If you have a to/from String via |
Indeed it would be, if I was right... I did a quick look and my memory isn't that good. These kind of cases should be handled. I'll take a good look at this instead of spouting nonsense. |
Alright, I've looked at your test cases and here's what I got:
|
I think this is the related issue for core databind, wrt default key serializer supporting and as stated, would be a Very Good thing to support. |
Now that the upstream issue is resolved, should we reopen this one? |
Yup. FWIW, I think key handling might now work without additional changes here. But a test would be good to have. |
We have a Multimap with Enum keys. |
Could this be same as: FasterXML/jackson-databind#749 NOTE: should only affect root values, but not values with Enum-key Multimaps. |
Serializing a Multimap<K, ?> fails if K is any non-String type, even if intuitively it should work (e.g. K is a string-like type such as Enum, or K has an
@JsonValue
annotation).I couldn't figure out how this is supposed to work, so I have included failing test cases for both the 1.9 branch and 2.x branch and hope that someone else who knows more about how Jackson's typing works can help out.
The text was updated successfully, but these errors were encountered: