CallDataSerializer

Bridges the user's wire-format T (a JSON string, a JNI Any? graph, etc.) to / from typed values. Implementations are tied to a specific wire format: a StringSerializer round-trips through kotlinx.serialization's string formats, a JniSerialization round-trips through the JNI Any? envelope, and so on.

Only successful payloads pass through this interface. Error responses are carried as the CallData.Error variant by the routing layer; transports encode and decode that variant natively (HTTP status codes, JSON-RPC error envelopes, packet error fields, etc.) and never round-trip an error through this serializer.

Functions

Link copied to clipboard
abstract fun <I> createCallData(serializer: KSerializer<I>, input: I): CallData<T>
Link copied to clipboard
abstract fun <I> decodeCallData(serializer: KSerializer<I>, data: CallData<T>): I