Package org.mongojack
Class ObjectMapperConfigurer
- java.lang.Object
-
- org.mongojack.ObjectMapperConfigurer
-
public class ObjectMapperConfigurer extends Object
Can be used by OSGi containers (or anyone else) to configure a custom ObjectMapper instance. This is necessary becauseMongoJackModuleis in the internal module, but it also can be used by any caller to avoid using the "internal" implementations.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.fasterxml.jackson.databind.ObjectMapperaddMongojackModuleOnly(com.fasterxml.jackson.databind.ObjectMapper mapper)Installs only the MongoJackModule, without JavaTimeModule or other settings.static com.fasterxml.jackson.databind.ObjectMapperaddMongojackModuleOnly(com.fasterxml.jackson.databind.ObjectMapper mapper, MongoJackModuleConfiguration moduleConfiguration)Installs only the MongoJackModule, without JavaTimeModule or other settings.static com.fasterxml.jackson.databind.ObjectMapperconfigureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)Install the MongoJackModule into the object mapper with recommended settings.static com.fasterxml.jackson.databind.ObjectMapperconfigureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper, MongoJackModuleConfiguration moduleConfiguration)Install the MongoJackModule into the object mapper with recommended settings.
-
-
-
Method Detail
-
configureObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
Install the MongoJackModule into the object mapper with recommended settings. Also installs JavaTimeModule.- Parameters:
mapper-- Returns:
-
configureObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper configureObjectMapper(com.fasterxml.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 com.fasterxml.jackson.databind.ObjectMapper addMongojackModuleOnly(com.fasterxml.jackson.databind.ObjectMapper mapper)
Installs only the MongoJackModule, without JavaTimeModule or other settings.- Parameters:
mapper-- Returns:
-
addMongojackModuleOnly
public static com.fasterxml.jackson.databind.ObjectMapper addMongojackModuleOnly(com.fasterxml.jackson.databind.ObjectMapper mapper, MongoJackModuleConfiguration moduleConfiguration)Installs only the MongoJackModule, without JavaTimeModule or other settings.- Parameters:
mapper-- Returns:
-
-