public class JakartaMappingProvider extends Object implements MappingProvider
Constructor and Description |
---|
JakartaMappingProvider() |
JakartaMappingProvider(jakarta.json.bind.JsonbConfig jsonbConfiguration) |
Modifier and Type | Method and Description |
---|---|
<T> T |
map(Object source,
Class<T> targetType,
Configuration configuration)
Maps supplied JSON source
Object to a given target class or collection. |
<T> T |
map(Object source,
TypeRef<T> targetType,
Configuration configuration)
Maps supplied JSON source
Object to a given target type or collection. |
public JakartaMappingProvider()
public JakartaMappingProvider(jakarta.json.bind.JsonbConfig jsonbConfiguration)
public <T> T map(Object source, Class<T> targetType, Configuration configuration)
Object
to a given target class or collection.
This implementation ignores the JsonPath's Configuration
argument.map
in interface MappingProvider
T
- the mapped result typesource
- object to maptargetType
- the type the source object should be mapped toconfiguration
- current configurationpublic <T> T map(Object source, TypeRef<T> targetType, Configuration configuration)
Object
to a given target type or collection.
This implementation ignores the JsonPath's Configuration
argument.
Method may produce a ClassCastException
on an attempt to cast
the result of JSON mapping operation to a requested target type, especially if
a parameterized generic type is used.
map
in interface MappingProvider
T
- the mapped result typesource
- object to maptargetType
- the type the source object should be mapped toconfiguration
- current configurationCopyright © 2024. All rights reserved.