Without looking too deep the first thing that is missing is that all delegating (de)serializers should implement and relay `Resolvable[De]Serializer` (resolve()) and `Contextual[De]Serializer` (`createContextual()`). Former may modify (de)serializer instance but requires no further work. Latter may create a new instance, so caller may need to further create a new instance of itself. There is `StdDelegating[De]Serializer` class that may be helpful as base class (and even without that, it is strongly recommended to at least extend `StdSerializer` / `StdDeserializer`, instead of directly extending `JsonSerializer` / `JsonDeserializer`.
So, first you need to make sure that default handler gets properly resolved and contextualized. -+ Tatu +- On Tue, Nov 14, 2017 at 1:42 PM, Mark Woon <[email protected]> wrote: > I tried to create a super simple BeanSerializerModifier and found that I'm > losing type information. Here's a simplified test case: > https://gist.github.com/markwoon/f8c4cc7c82ea819a27434dc4090c16c1 > > Can anyone tell me if I'm doing something wrong or if this is a bug in > Jackson? > > > Thanks, > -Mark > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- 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 [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
