-
-
Notifications
You must be signed in to change notification settings - Fork 230
Closed
Labels
2.18Issues planned at earliest for 2.18Issues planned at earliest for 2.18
Description
I'm using a custom SerializerFactory
as follows.
ObjectMapper mapper = new XmlMapper().setSerializerFactory(MySerializerFactory.INSTANCE);
I noticed that in the constructor of XmlMapper
, the default XML_MODULE
is registered, which also configures the SerializerFactory
. Since I'm overriding it after constructing, this configuration is lost, resulting in different behaviour, which is very confusing.
I currently don't see any way for registering my custom SerializerFactory
before the XML_MODULE
is registered. Is this intended? It seems error-prone.
My current workaround:
ObjectMapper mapper = new XmlMapper((JacksonXmlModule) null)
.setSerializerFactory(RosettaSerialiserFactory.INSTANCE)
.registerModule(new JacksonXmlModule());
Metadata
Metadata
Assignees
Labels
2.18Issues planned at earliest for 2.18Issues planned at earliest for 2.18