I would not recommend trying to sub-class Jackson's default serializers: this is fragile.
But if you do want to do it, have a look at MapSerializer
: my guess is that its createContextual()
method ends up constructing a differently configured instance. You may need to override one of other methods which handled creationg of such instances; you just need those to construct instanceof MyMapSerializer
instead of default MapSerializer
.