One reason is that these 2 classes are used by default, and you should not need to use them by using annotations. This is true for most standard Jackson serializers and deserializers. Instead, core databind needs to construct and configure them with a wide range of settings, most of which are passed via constructor. Making use via no-args constructor would be additional work and there seemed to be no need to do that.
So it is not as much intentionally prevented as left out. Simply adding no-args constructor itself would not work; additional detection and configuration would be needed for things like polymorphic type id, object id, custom annotation handling. -+ Tatu +- On Fri, Jul 7, 2017 at 7:39 PM, Matthew Ouyang <[email protected]> wrote: > I'm aware this is not possible because MapDeserializer and > CollectionDeserializer don't have a no-arg constructors. What is not clear > to me is the reasoning behind this, and if this is intentional. I'm only > asking because I was hoping to do what I wrote in the subject line instead > of writing a small yet simple custom deserializer. > > -- > You received this message because you are subscribed to the Google Groups > "jackson-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > 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-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
