Package-level declarations

Types

Link copied to clipboard
typealias AnySerializable = @Serializable(with = AnySerializer::class) Any

Any pre-wired to AnySerializer — every "opaque payload" field in a schema (an event's body, data, etc.) is declared with this typealias (or its nullable form, AnySerializable?) rather than a plain Any, so kotlinx.serialization knows how to (de)serialize a value whose real shape is only known at runtime.

Link copied to clipboard
object AnySerializer : KSerializer<Any>

Serializes an untyped Any value by converting it to/from a raw JsonElement tree — via Any?.toJsonElement()/JsonElement.toAny() — the mechanism behind every "opaque payload" field in the framework (an event's body, data, EvaluateData's inline literals, etc.), where the field's real shape is only known at runtime, not at schema-authoring time. Reached via the AnySerializable typealias, never used directly.

Link copied to clipboard
class ImmutableListSerializer<T>(elementSerializer: KSerializer<T>) : KSerializer<ImmutableList<T>>

Serializes an ImmutableList the same way a plain List would (delegating entirely to ListSerializer), converting back to ImmutableList on decode. Not used directly — reached via the SerializableImmutableList typealias, which is what every schema's own list field (tiles, events, searchableTerms, etc.) actually declares its type as.

Link copied to clipboard
class ImmutableMapSerializer<K, V>(keySerializer: KSerializer<K>, valueSerializer: KSerializer<V>) : KSerializer<ImmutableMap<K, V>>

Serializes an ImmutableMap the same way a plain Map would (delegating entirely to MapSerializer), converting back to ImmutableMap on decode — the map-shaped counterpart of ImmutableListSerializer. Reached via the SerializableImmutableMap typealias.

Link copied to clipboard
typealias SerializableImmutableList<T> = @Serializable(with = ImmutableListSerializer::class) ImmutableList<T>

ImmutableList<T> pre-wired to ImmutableListSerializer — every list-typed field on a dev.catbit.mosaic.core.data.schemas.tile.TileSchema/dev.catbit.mosaic.core.data.schemas.event.EventSchema is declared with this typealias rather than a plain ImmutableList<T>, so kotlinx.serialization knows how to (de)serialize it without per-field @Serializable(with = ...) boilerplate.

Link copied to clipboard
typealias SerializableImmutableMap<K, V> = @Serializable(with = ImmutableMapSerializer::class) ImmutableMap<K, V>

ImmutableMap<K, V> pre-wired to ImmutableMapSerializer — the map-shaped counterpart of SerializableImmutableList, used by any schema field declared as an immutable map.