Package com.jayway.jsonpath.spi.mapper
Class JakartaMappingProvider
- java.lang.Object
-
- com.jayway.jsonpath.spi.mapper.JakartaMappingProvider
-
- All Implemented Interfaces:
MappingProvider
public class JakartaMappingProvider extends java.lang.Object implements MappingProvider
-
-
Constructor Summary
Constructors Constructor Description JakartaMappingProvider()JakartaMappingProvider(jakarta.json.bind.JsonbConfig jsonbConfiguration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tmap(java.lang.Object source, TypeRef<T> targetType, Configuration configuration)Maps supplied JSON sourceObjectto a given target type or collection.<T> Tmap(java.lang.Object source, java.lang.Class<T> targetType, Configuration configuration)Maps supplied JSON sourceObjectto a given target class or collection.
-
-
-
Method Detail
-
map
public <T> T map(java.lang.Object source, java.lang.Class<T> targetType, Configuration configuration)Maps supplied JSON sourceObjectto a given target class or collection. This implementation ignores the JsonPath'sConfigurationargument.- Specified by:
mapin 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
public <T> T map(java.lang.Object source, TypeRef<T> targetType, Configuration configuration)Maps supplied JSON sourceObjectto a given target type or collection. This implementation ignores the JsonPath'sConfigurationargument.Method may produce a
ClassCastExceptionon an attempt to cast the result of JSON mapping operation to a requested target type, especially if a parameterized generic type is used.- Specified by:
mapin 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
-
-