ParcelableArraySerializer



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

@Serializable
class MyModel(
    @Serializable(with = ParcelableArraySerializer::class)
    val parcelableArray: Array<android.os.Parcelable>
)

Summary

Public constructors

android

Public functions

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

Public properties

open SerialDescriptor
android

Public constructors

ParcelableArraySerializer

ParcelableArraySerializer()

Public functions

deserialize

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

serialize

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

Public properties

descriptor

open val descriptorSerialDescriptor