use of com.fasterxml.jackson.databind.module.SimpleSerializers in project Rosetta by HubSpot.
the class RosettaObjectMapperTest method registerSerializer.
private static void registerSerializer(ConfigRegistry config, JsonSerializer<TestObject> serializer) {
ObjectMapper objectMapper = new ObjectMapper();
SimpleModule module = new SimpleModule();
module.setSerializers(new SimpleSerializers(Collections.singletonList(serializer)));
objectMapper.registerModule(module);
config.get(RosettaObjectMapper.class).setObjectMapper(objectMapper);
}
Aggregations