ZComponentSerializer

abstract class ZComponentSerializer<T : ZComponent, D : Any> : KSerializer<T> (source)

Abstract base class for serializing ZComponent instances.

This class provides a framework for converting components to and from serialized data formats. It handles the serialization logic for both ZSerializableComponent and ZOmniComponent instances, ensuring proper data persistence and restoration.

Type Parameters

T

The type of the component being serialized. Must inherit from ZComponent.

D

The type of the data associated with the component.

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor
Link copied to clipboard
abstract val kSerializer: KSerializer<D>

The serializer for the data type associated with this component.

Functions

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