Interface JsonSerializer<T>

All Known Implementing Classes:
AtomicExecution.KeyOrLoadSerializer, AtomicExecutionGroup.Serializer, JsonSerializable.Serializer, PartialExecution.Serializer

public interface JsonSerializer<T>
Alternative to JsonSerializable: Externalizes serialization logic.
  • Method Details

    • 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, Class<? extends T> cls)
      Deserializes an object.
      Parameters:
      json - that should be serialized
      cls - the Class of the object to be created
      Returns:
      the deserialized object