JSONRPCMessageSerializer

Content-based polymorphic serializer for JSONRPCMessage.

Discriminates between JSONRPCRequest and JSONRPCNotification based on the presence of the "id" field in the JSON object:

The params field is serialized as raw JsonElement by default. For typed params, supply a concrete paramsSerializer.

Parameters

paramsSerializer

Serializer for the params value.

Type Parameters

P

The type of the params field.

Constructors

Link copied to clipboard
constructor(paramsSerializer: KSerializer<P>)

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): JSONRPCMessage<P>
Link copied to clipboard
open override fun serialize(encoder: Encoder, value: JSONRPCMessage<P>)