ByteArrayAsBase64Serializer

object ByteArrayAsBase64Serializer : KSerializer<ByteArray>

A custom serializer for ByteArray that encodes to and decodes from Base64 strings.

It uses standard Base64 encoding for serialization. For deserialization, it first attempts to decode using standard Base64, and falls back to URL-safe Base64 if that fails.

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

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