Class JakartaMappingProvider

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T map​(java.lang.Object source, TypeRef<T> targetType, Configuration configuration)
      Maps supplied JSON source Object to a given target type or collection.
      <T> T map​(java.lang.Object source, java.lang.Class<T> targetType, Configuration configuration)
      Maps supplied JSON source Object to a given target class or collection.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JakartaMappingProvider

        public JakartaMappingProvider()
      • JakartaMappingProvider

        public JakartaMappingProvider​(jakarta.json.bind.JsonbConfig jsonbConfiguration)
    • Method Detail

      • map

        public <T> T map​(java.lang.Object source,
                         java.lang.Class<T> targetType,
                         Configuration configuration)
        Maps supplied JSON source Object to a given target class or collection. This implementation ignores the JsonPath's Configuration argument.
        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​(java.lang.Object source,
                         TypeRef<T> targetType,
                         Configuration configuration)
        Maps supplied JSON source 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.

        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