Interface Serializer

All Known Implementing Classes:
AbstractSerializer, JavaSerializer, JsonSerializer

public interface Serializer
The serializer contract.
Since:
3.9.0
Author:
Jerome LELEU
  • Method Details

    • serializeToString

      String serializeToString(Object obj)
      Encode an object into a string.
      Parameters:
      obj - the object to encode
      Returns:
      the encoded string
    • serializeToBytes

      byte[] serializeToBytes(Object obj)
      Encode an object into a bytes array.
      Parameters:
      obj - the object to encode
      Returns:
      the encoded bytes array
    • deserializeFromString

      Object deserializeFromString(String encoded)
      Decode a string into an object.
      Parameters:
      encoded - the encoded string
      Returns:
      the decoded object
    • deserializeFromBytes

      Object deserializeFromBytes(byte[] encoded)
      Decode a bytes array into an object.
      Parameters:
      encoded - the encoded bytes array
      Returns:
      the decoded object