Package akka.javasdk.testkit
Class SerializationTestkit
Object
akka.javasdk.testkit.SerializationTestkit
Helper class for serializing and deserializing objects for testing schema migration. Supports
both JSON and Protobuf serialization formats.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Tdeserialize(Class<T> valueClass, byte[] bytes) Deserialize bytes to the expected type.static <T> byte[]serialize(T value) Serialize a value to bytes.
-
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
Deserialize bytes to the expected type. Automatically detects the content type and uses the appropriate deserializer.
-