You do not need to handle serialization for messages. Akka Serverless functions serve gRPC interfaces, and the input and output messages are
protobuf messages that get serialized to the
protobuf format. However, for objects to be persisted such as Event Sourced events and snapshots you have a choice.
By default, Akka Serverless will automatically detect if an emitted event or snapshot is a
The following example sets JSON serialization fo a snapshot: