Package net.solarnetwork.service.support
Class SimpleObjectMapperService
java.lang.Object
net.solarnetwork.service.support.SimpleObjectMapperService
- All Implemented Interfaces:
ObjectMapperService
- Direct Known Subclasses:
ObjectMapperModuleSupport
Basic implementation of
ObjectMapperService.- Version:
- 2.0
- Author:
- matt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.ObjectMapperGet theObjectMapperinstance.voidsetJsonFactory(com.fasterxml.jackson.core.JsonFactory factory) Set theJsonFactoryto use.voidsetObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Set the mapper to use.
-
Constructor Details
-
SimpleObjectMapperService
public SimpleObjectMapperService()
-
-
Method Details
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()Description copied from interface:ObjectMapperServiceGet theObjectMapperinstance.- Specified by:
getObjectMapperin interfaceObjectMapperService- Returns:
- the mapper
-
setObjectMapper
public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Set the mapper to use.- Parameters:
objectMapper- the mapper to use
-
setJsonFactory
public void setJsonFactory(com.fasterxml.jackson.core.JsonFactory factory) Set theJsonFactoryto use.This will cause a new
ObjectMapperto be instantiated with the given factory.- Parameters:
factory- the factory to use- Since:
- 1.1
-