Package com.microsoft.durabletask
Class JacksonDataConverter
- java.lang.Object
-
- com.microsoft.durabletask.JacksonDataConverter
-
- All Implemented Interfaces:
DataConverter
public final class JacksonDataConverter extends java.lang.Object implements DataConverter
An implementation ofDataConverterthat uses Jackson APIs for data serialization.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.microsoft.durabletask.DataConverter
DataConverter.DataConverterException
-
-
Constructor Summary
Constructors Constructor Description JacksonDataConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tdeserialize(java.lang.String jsonText, java.lang.Class<T> targetType)Deserializes the given text data into an object of the specified type.java.lang.Stringserialize(java.lang.Object value)Serializes the input into a text representation.
-
-
-
Method Detail
-
serialize
public java.lang.String serialize(java.lang.Object value)
Description copied from interface:DataConverterSerializes the input into a text representation.- Specified by:
serializein interfaceDataConverter- Parameters:
value- the value to be serialized- Returns:
- a serialized text representation of the value or
nullif the value isnull
-
deserialize
public <T> T deserialize(java.lang.String jsonText, java.lang.Class<T> targetType)Description copied from interface:DataConverterDeserializes the given text data into an object of the specified type.- Specified by:
deserializein interfaceDataConverter- 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 objecttargetType- the target class to deserialize the input into- Returns:
- a deserialized object of type
T
-
-