Default serialization
By default, Typescript SDK uses the built-in JSON support to perform (de)serialization.Standard Schema & Zod
You can use any Standard schema compliant library for your handler input/output schemas, such as Zod:For Zod < 4.2
For Zod < 4.2
If you’re using Zod versions earlier than 4.2, you should use the ad-hoc Zod integration instead:
@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: