Interface JsonConverterDelegate

All Known Implementing Classes:
HttpMessageContentConverter

public interface JsonConverterDelegate
Delegate to abstract JSON type conversion in AssertJ support clases.
Since:
7.0
Author:
Rossen Stoyanchev
  • Method Details

    • read

      <T> T read(String content, ResolvableType targetType) throws IOException
      Convert JSON content to the given targetType.
      Type Parameters:
      T - the target type
      Parameters:
      content - the JSON content
      targetType - the target type
      Returns:
      the decoded object
      Throws:
      IOException
    • map

      <T> T map(Object value, ResolvableType targetType) throws IOException
      Map the given Object value to the given targetType, via serialization and deserialization to and from JSON. This is useful for mapping generic maps and lists to higher level Objects.
      Type Parameters:
      T - the target type
      Parameters:
      value - the value to map
      targetType - the target tyep
      Returns:
      the decoded object
      Throws:
      IOException
    • of

      Create a JsonConverterDelegate from message converters.
      Parameters:
      candidates - the candidates