CharSequenceListSerializer



A serializer for Array. This serializer uses SavedState's API directly to save/load a Array.

Note that this serializer should be used with SavedStateEncoder or SavedStateDecoder only. Using it with other Encoders/Decoders may throw IllegalArgumentException.

import androidx.savedstate.serialization.serializers.CharSequenceListSerializer

@Serializable
class MyModel(
    @Suppress("SERIALIZER_TYPE_INCOMPATIBLE")
    @Serializable(with = CharSequenceListSerializer::class)
    val charSequenceList: List<CharSequence>
)

Summary

Public constructors

android

Public functions

open List<CharSequence>
deserialize(decoder: Decoder)
android
open Unit
serialize(encoder: Encoder, value: List<CharSequence>)
android

Public properties

open SerialDescriptor
android

Public constructors

CharSequenceListSerializer

CharSequenceListSerializer()

Public functions

deserialize

open fun deserialize(decoder: Decoder): List<CharSequence>

serialize

open fun serialize(encoder: Encoder, value: List<CharSequence>): Unit

Public properties

descriptor

open val descriptorSerialDescriptor