Package org.apache.wayang.core.util
Interface JsonSerializer<T>
-
- All Known Implementing Classes:
AtomicExecution.KeyOrLoadSerializer
,AtomicExecutionGroup.Serializer
,JsonSerializable.Serializer
,PartialExecution.Serializer
public interface JsonSerializer<T>
Alternative toJsonSerializable
: Externalizes serialization logic.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default T
deserialize(WayangJsonObj json)
Deserializes an object.T
deserialize(WayangJsonObj json, java.lang.Class<? extends T> cls)
Deserializes an object.WayangJsonObj
serialize(T object)
Serializes an object.
-
-
-
Method Detail
-
serialize
WayangJsonObj serialize(T object)
Serializes an object.- Parameters:
object
- that should be serialized- Returns:
- the serialized object
-
deserialize
default T deserialize(WayangJsonObj json)
Deserializes an object.- Parameters:
json
- that should be serialized- Returns:
- the deserialized object
-
deserialize
T deserialize(WayangJsonObj json, java.lang.Class<? extends T> cls)
Deserializes an object.- Parameters:
json
- that should be serializedcls
- theClass
of the object to be created- Returns:
- the deserialized object
-
-