ParcelableListSerializer



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

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

@Serializable
class MyModel(
    @Serializable(with = ParcelableListSerializer::class)
    val parcelableList: List<android.os.Parcelable>
)

Summary

Public constructors

android

Public functions

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

Public properties

open SerialDescriptor
android

Public constructors

ParcelableListSerializer

ParcelableListSerializer()

Public functions

deserialize

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

serialize

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

Public properties

descriptor

open val descriptorSerialDescriptor