Skip to content

Latest commit

 

History

History
66 lines (36 loc) · 1.26 KB

File metadata and controls

66 lines (36 loc) · 1.26 KB

Home > @aws/durable-execution-sdk-js > Serdes

Serdes interface

Serdes (Serialization/Deserialization) interface for durable functions. This interface allows customizing how data is serialized and deserialized when persisting state in durable functions.

Both methods are async to support custom implementations that need to interact with external services (e.g., AWS S3, DynamoDB, etc.)

Signature:

export interface Serdes<T>

Properties

Property

Modifiers

Type

Description

deserialize

(data: string | undefined, context: SerdesContext) => Promise<T | undefined>

Deserializes a string back to the original value

serialize

(value: T | undefined, context: SerdesContext) => Promise<string | undefined>

Serializes a value to a string representation