Class SimpleObjectMapperService

java.lang.Object
net.solarnetwork.service.support.SimpleObjectMapperService
All Implemented Interfaces:
ObjectMapperService
Direct Known Subclasses:
ObjectMapperModuleSupport

public class SimpleObjectMapperService extends Object implements ObjectMapperService
Basic implementation of ObjectMapperService.
Version:
2.0
Author:
matt
  • Constructor Details

    • SimpleObjectMapperService

      public SimpleObjectMapperService()
  • Method Details

    • getObjectMapper

      public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
      Description copied from interface: ObjectMapperService
      Get the ObjectMapper instance.
      Specified by:
      getObjectMapper in interface ObjectMapperService
      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 the JsonFactory to use.

      This will cause a new ObjectMapper to be instantiated with the given factory.

      Parameters:
      factory - the factory to use
      Since:
      1.1