Base64Serializer
open class Base64Serializer<T>(converterFrom: (T) -> String, converterTo: (String) -> T) : KSerializer<T> (source)
A serializer that encodes values to Base64 strings and decodes them back. Uses custom conversion functions to transform between type T and string representation.
Parameters
converter From
Converts from type T to a string representation
converter To
Converts from a string representation back to type T
Type Parameters
T
The type to serialize/deserialize
Inheritors
Functions
Link copied to clipboard
Link copied to clipboard
inline fun <I : Any, O> DeserializationStrategy<I>.mapDeserialization(noinline deserialize: (I) -> O): MapperDeserializationStrategy<I, O>
Will create MapperDeserializationStrategy to allow you to map I to O using deserialize lambda during deserialization process
Link copied to clipboard
inline fun <I : Any, O> KSerializer<I>.mapFullSerialization(noinline serialize: (O) -> I, noinline deserialize: (I) -> O): MapperSerializer<I, O>
Will create MapperSerializer to allow you to map O to I and vice verse using serialize/deserialize lambda during serialization/deserialization process
Link copied to clipboard
inline fun <I : Any, O> SerializationStrategy<I>.mapSerialization(noinline serialize: (O) -> I): MapperSerializationStrategy<I, O>
Will create MapperSerializationStrategy to allow you to map O to I using serialize lambda during serialization process