Package com.jayway.jsonpath.spi.mapper
Class JakartaMappingProvider
java.lang.Object
com.jayway.jsonpath.spi.mapper.JakartaMappingProvider
- All Implemented Interfaces:
MappingProvider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Tmap(Object source, TypeRef<T> targetType, Configuration configuration) Maps supplied JSON sourceObjectto a given target type or collection.<T> Tmap(Object source, Class<T> targetType, Configuration configuration) Maps supplied JSON sourceObjectto a given target class or collection.
-
Constructor Details
-
JakartaMappingProvider
public JakartaMappingProvider() -
JakartaMappingProvider
public JakartaMappingProvider(jakarta.json.bind.JsonbConfig jsonbConfiguration)
-
-
Method Details
-
map
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
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
-