Package com.jayway.jsonpath.spi.mapper
Class GsonMappingProvider
java.lang.Object
com.jayway.jsonpath.spi.mapper.GsonMappingProvider
- All Implemented Interfaces:
MappingProvider
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGsonMappingProvider
(com.google.gson.Gson gson) GsonMappingProvider
(Callable<com.google.gson.Gson> factory) -
Method Summary
Modifier and TypeMethodDescription<T> T
map
(Object source, TypeRef<T> targetType, Configuration configuration) <T> T
map
(Object source, Class<T> targetType, Configuration configuration)
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
factory
-
-
Constructor Details
-
GsonMappingProvider
public GsonMappingProvider(com.google.gson.Gson gson) -
GsonMappingProvider
-
GsonMappingProvider
public GsonMappingProvider()
-
-
Method Details
-
map
- Specified by:
map
in interfaceMappingProvider
- Type Parameters:
T
- the mapped result type- Parameters:
source
- object to maptargetType
- the type the source object should be mapped toconfiguration
- current configuration- Returns:
- return the mapped object
-
map
- Specified by:
map
in interfaceMappingProvider
- Type Parameters:
T
- the mapped result type- Parameters:
source
- object to maptargetType
- the type the source object should be mapped toconfiguration
- current configuration- Returns:
- return the mapped object
-