Class ObjectMapperConfigurer
java.lang.Object
org.mongojack.ObjectMapperConfigurer
Can be used by OSGi containers (or anyone else) to configure a custom ObjectMapper instance. This is necessary
because
MongoJackModule is in the internal module, but it also can be used
by any caller to avoid using the "internal" implementations.-
Method Summary
Modifier and TypeMethodDescriptionstatic tools.jackson.databind.ObjectMapperaddMongojackModuleOnly(tools.jackson.databind.ObjectMapper mapper) Installs only the MongoJackModule, without JavaTimeModule or other settings.static tools.jackson.databind.ObjectMapperaddMongojackModuleOnly(tools.jackson.databind.ObjectMapper mapper, MongoJackModuleConfiguration moduleConfiguration) Installs only the MongoJackModule, without JavaTimeModule or other settings.static tools.jackson.databind.ObjectMapperconfigureObjectMapper(tools.jackson.databind.ObjectMapper mapper) Install the MongoJackModule into the object mapper with recommended settings.static tools.jackson.databind.ObjectMapperconfigureObjectMapper(tools.jackson.databind.ObjectMapper mapper, MongoJackModuleConfiguration moduleConfiguration) Install the MongoJackModule into the object mapper with recommended settings.
-
Method Details
-
configureObjectMapper
public static tools.jackson.databind.ObjectMapper configureObjectMapper(tools.jackson.databind.ObjectMapper mapper) Install the MongoJackModule into the object mapper with recommended settings. Also installs JavaTimeModule.- Parameters:
mapper-- Returns:
-
configureObjectMapper
public static tools.jackson.databind.ObjectMapper configureObjectMapper(tools.jackson.databind.ObjectMapper mapper, MongoJackModuleConfiguration moduleConfiguration) Install the MongoJackModule into the object mapper with recommended settings. Also installs JavaTimeModule.- Parameters:
mapper-- Returns:
-
addMongojackModuleOnly
public static tools.jackson.databind.ObjectMapper addMongojackModuleOnly(tools.jackson.databind.ObjectMapper mapper) Installs only the MongoJackModule, without JavaTimeModule or other settings.- Parameters:
mapper-- Returns:
-
addMongojackModuleOnly
public static tools.jackson.databind.ObjectMapper addMongojackModuleOnly(tools.jackson.databind.ObjectMapper mapper, MongoJackModuleConfiguration moduleConfiguration) Installs only the MongoJackModule, without JavaTimeModule or other settings.- Parameters:
mapper-- Returns:
-