Skip to main content

Interface: TypeInfo<T, D>

common.TypeInfo

Describes how SDK conversion helpers adapt an application value of type T for payload conversion.

transferTypeConverter performs an application-defined, payload-converter-independent transformation. For example, it can convert a class instance into a plain object before JSON serialization.

payloadConverterHint carries metadata for a specific payload converter and describes its value type D. For example, a Protobuf converter hint can identify the message type required to deserialize bytes.

On encoding, transfer type conversion runs before payload conversion. On decoding, payload conversion runs before transfer type conversion. Either mechanism may be used independently or they may be combined.

When transferTypeConverter is unspecified, D should be the same type as T.

SDK conversion helpers apply this information when supplied. Calling a PayloadConverter directly does not.

Type parameters

NameType
Tunknown
DT

Properties

payloadConverterHint

Optional payloadConverterHint: ConverterHint<D>

Metadata forwarded unchanged to the payload converter.

Use this when conversion requires format-specific runtime information, such as a Protobuf message type.


transferTypeConverter

Optional transferTypeConverter: TransferTypeConverter<T, D>

Converts between the application value and a representation suitable for payload conversion.

This transformation runs outside the payload converter and should not depend on its serialization format.