ReserializableByteStringSerializer

class ReserializableByteStringSerializer<T>(dataSerializer: KSerializer<T>) : KSerializer<ByteStringWrapper<T>> (source)

Like ByteStringWrapperSerializer, but writes ByteStringWrapper.serialized as it is if present, so a decoded value is serialized again to the same bytes, and only encodes ByteStringWrapper.value without it.

Constructors

Link copied to clipboard
constructor(dataSerializer: KSerializer<T>)

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

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