ToolResultStringSerializer

open class ToolResultStringSerializer<T>(val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("ToolResultString", PrimitiveKind.STRING), toStringConverter: (T) -> String) : KSerializer<T> (source)

A generic simple serializer for serializing objects of type T into their string representation using a custom converter.

Parameters

T

The type of the object to be serialized.

Constructors

Link copied to clipboard
constructor(descriptor: SerialDescriptor = PrimitiveSerialDescriptor("ToolResultString", PrimitiveKind.STRING), toStringConverter: (T) -> String)

Properties

Link copied to clipboard
override val descriptor: SerialDescriptor

The serial descriptor for the serialization, defaulting to a primitive string type.

Functions

Link copied to clipboard
override fun deserialize(decoder: Decoder): T
Link copied to clipboard
override fun serialize(encoder: Encoder, value: T)