Interface FormatMapper

All Known Implementing Classes:
AbstractJsonFormatMapper, JacksonJsonFormatMapper, JacksonOsonFormatMapper, JacksonXmlFormatMapper, JaxbXmlFormatMapper, JsonBJsonFormatMapper

@Incubating public interface FormatMapper
A mapper for mapping objects to and from a format.
See Also:
  • Method Details

    • fromString

      <T> T fromString(CharSequence charSequence, JavaType<T> javaType, WrapperOptions wrapperOptions)
      Deserializes an object from the character sequence.
    • toString

      <T> String toString(T value, JavaType<T> javaType, WrapperOptions wrapperOptions)
      Serializes the object to a string.
    • supportsSourceType

      default boolean supportsSourceType(Class<?> sourceType)
      Checks that this mapper supports a type as a source type.
      Parameters:
      sourceType - the source type
      Returns:
      true if the type is supported, false otherwise.
    • supportsTargetType

      default boolean supportsTargetType(Class<?> targetType)
      Checks that this mapper supports a type as a target type.
      Parameters:
      targetType - the target type
      Returns:
      true if the type is supported, false otherwise.
    • writeToTarget

      default <T> void writeToTarget(T value, JavaType<T> javaType, Object target, WrapperOptions options) throws IOException
      Throws:
      IOException
    • readFromSource

      default <T> T readFromSource(JavaType<T> javaType, Object source, WrapperOptions options) throws IOException
      Throws:
      IOException