Class SerializationTestkit

Object
akka.javasdk.testkit.SerializationTestkit

public final class SerializationTestkit extends Object
Helper class for serializing and deserializing objects for testing schema migration. Supports both JSON and Protobuf serialization formats.
  • Constructor Details

    • SerializationTestkit

      public SerializationTestkit()
  • Method Details

    • serialize

      public static <T> byte[] serialize(T value)
      Serialize a value to bytes. Automatically uses protobuf format for protobuf messages and JSON format for other types.
    • deserialize

      public static <T> T deserialize(Class<T> valueClass, byte[] bytes)
      Deserialize bytes to the expected type. Automatically detects the content type and uses the appropriate deserializer.