CharSequenceArraySerializer



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.CharSequenceArraySerializer

@Serializable
class MyModel(
    @Serializable(with = CharSequenceArraySerializer::class)
    val charSequenceArray: Array<CharSequence>
)

Summary

Public constructors

android

Public functions

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

Public properties

open SerialDescriptor
android

Public constructors

CharSequenceArraySerializer

CharSequenceArraySerializer()

Public functions

deserialize

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

serialize

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

Public properties

descriptor

open val descriptorSerialDescriptor