YsonValue

sealed interface YsonValue

YsonValue represents any valid YSON value.

Variants cover the standard JSON value set plus Yorkie CRDT and special scalar types: YsonText, YsonTree, YsonInt, YsonLong, YsonDate, YsonBinData, and YsonCounter.

Inheritors

Types

Link copied to clipboard
data class YsonArray(val elements: List<YsonValue>) : YsonValue

YsonArray represents an ordered list of values.

Link copied to clipboard
data class YsonBinData(val value: String) : YsonValue

YsonBinData represents a Base64-encoded binary literal, serialized as BinData("...").

Link copied to clipboard
data class YsonBoolean(val value: Boolean) : YsonValue

YsonBoolean wraps a boolean primitive.

Link copied to clipboard
data class YsonCounter(val value: YsonValue) : YsonValue

YsonCounter represents a Counter CRDT, serialized as Counter(Int(...)) or Counter(Long(...)).

Link copied to clipboard
data class YsonDate(val value: String) : YsonValue

YsonDate represents an ISO 8601 timestamp literal, serialized as Date("...").

Link copied to clipboard
data class YsonDedupCounter(val value: YsonValue, val registers: String) : YsonValue

YsonDedupCounter represents a DedupCounter CRDT that counts unique actors via HyperLogLog, serialized as DedupCounter(Int(...),"base64").

Link copied to clipboard
data class YsonInt(val value: Int) : YsonValue

YsonInt represents a 32-bit integer literal, serialized as Int(value).

Link copied to clipboard
data class YsonLong(val value: Long) : YsonValue

YsonLong represents a 64-bit integer literal, serialized as Long(value).

Link copied to clipboard

YsonNull represents the JSON null literal.

Link copied to clipboard
data class YsonNumber(val value: Double) : YsonValue

YsonNumber wraps a JSON number primitive.

Link copied to clipboard
data class YsonObject(val entries: Map<String, YsonValue>) : YsonValue

YsonObject represents a plain key-value map.

Link copied to clipboard
data class YsonString(val value: String) : YsonValue

YsonString wraps a string primitive.

Link copied to clipboard
data class YsonText(val nodes: List<YsonTextNode>) : YsonValue

YsonText represents a Text CRDT, serialized as Text([...]).

Link copied to clipboard
data class YsonTree(val root: YsonTreeNode) : YsonValue

YsonTree represents a Tree CRDT, serialized as Tree({...}).