But why would the type erasure on the map be the deciding factor here? The type of the value is known at runtime, it is Bar, it has a property lol - that gets serialized no problem, clearly it knows the type and therefore can see the @JsonTypeInfo annotation on the superclass. I don't have to do objectMapper.writerFor(Foo.class).writeValueAsString(foo) to get the type information included, it is included by calling objectMapper.writeValueAsString(foo) directly. I think for the most part I don't understand this inconsistency. What does it matter that now it's a part of a collection?
Thanks for taking the time with me on this. At this point between you showing me the typed writer and looking at source for resteasy-jackson2-provider, which is what I'll be using to build something that matters, I think everything should work as it's supposed to and I won't need the getter. I suppose this is an artifact of how I set up my prototype. -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to jackson-user+unsubscr...@googlegroups.com. To post to this group, send email to jackson-user@googlegroups.com. For more options, visit https://groups.google.com/d/optout.