Class JacksonMappingProvider

java.lang.Object
com.jayway.jsonpath.spi.mapper.JacksonMappingProvider
All Implemented Interfaces:
MappingProvider

public class JacksonMappingProvider extends Object implements MappingProvider
  • Field Details

    • objectMapper

      private final com.fasterxml.jackson.databind.ObjectMapper objectMapper
  • Constructor Details

    • JacksonMappingProvider

      public JacksonMappingProvider()
    • JacksonMappingProvider

      public JacksonMappingProvider(com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • map

      public <T> T map(Object source, Class<T> targetType, Configuration configuration)
      Specified by:
      map in interface MappingProvider
      Type Parameters:
      T - the mapped result type
      Parameters:
      source - object to map
      targetType - the type the source object should be mapped to
      configuration - current configuration
      Returns:
      return the mapped object
    • map

      public <T> T map(Object source, TypeRef<T> targetType, Configuration configuration)
      Specified by:
      map in interface MappingProvider
      Type Parameters:
      T - the mapped result type
      Parameters:
      source - object to map
      targetType - the type the source object should be mapped to
      configuration - current configuration
      Returns:
      return the mapped object