Class JacksonDataConverter

java.lang.Object
io.dapr.durabletask.JacksonDataConverter
All Implemented Interfaces:
DataConverter

public final class JacksonDataConverter extends Object implements DataConverter
An implementation of DataConverter that uses Jackson APIs for data serialization.
  • Constructor Details

    • JacksonDataConverter

      public JacksonDataConverter()
  • Method Details

    • serialize

      public String serialize(Object value)
      Description copied from interface: DataConverter
      Serializes the input into a text representation.
      Specified by:
      serialize in interface DataConverter
      Parameters:
      value - the value to be serialized
      Returns:
      a serialized text representation of the value or null if the value is null
    • deserialize

      public <T> T deserialize(String jsonText, Class<T> targetType)
      Description copied from interface: DataConverter
      Deserializes the given text data into an object of the specified type.
      Specified by:
      deserialize in interface DataConverter
      Type Parameters:
      T - the generic parameter type representing the target class to deserialize the input into
      Parameters:
      jsonText - the text data to deserialize into an object
      targetType - the target class to deserialize the input into
      Returns:
      a deserialized object of type T