Default serialization
By default, Typescript SDK uses the built-in JSON support to perform (de)serialization.Zod schemas
You can use Zod to define the schema of your handler input/output. Make sure to install the extra dependency for zod integration:@restatedev/restate-sdk-zod
.
Then do the following:
Custom serialization
It is possible to implement customized serialization using theSerde
interface.
For example, to implement custom serializers for the handler input and output: