ORMapEntrySerializer

class ORMapEntrySerializer<S : Quilted<S>>(valueSerializer: KSerializer<S>) : KSerializer<ORMapEntry<S>>

Custom KSerializer for ORMapEntry<S> that emits ORMapEntry.contributions sorted by Dot key, so two replicas at the same logical state produce identical bytes regardless of the order their merges happened to run in.

Wire format: Map<Dot, S> — the same shape DotFunSerializer emits, and for the same reason. ORMapEntry.join builds a LinkedHashMap whose iteration order depends on which side was self and which was other; sorting before encoding makes the wire form a function of the value.

Sort order: sortedByCanonicalKey, the one canonical order shared with the rest of the dot family (#1964).

Constructors

Link copied to clipboard
constructor(valueSerializer: KSerializer<S>)

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): ORMapEntry<S>
Link copied to clipboard
open override fun serialize(encoder: Encoder, value: ORMapEntry<S>)