JsonValue

@Serializable
sealed class JsonValue

A JSON scalar value held by a JsonNode.Leaf.

Models the four primitive JSON types: null, boolean, number, and string. Structured types (object, array) are represented as JsonNode.Object and JsonNode.Array — not as JsonValue — so the type lattice stays clean.

Inheritors

Types

Link copied to clipboard
@Serializable
@SerialName(value = "bool")
data class Bool(val value: Boolean) : JsonValue
Link copied to clipboard
@Serializable
@SerialName(value = "null")
data object Null : JsonValue
Link copied to clipboard
@Serializable
@SerialName(value = "num")
data class Num(val value: Double) : JsonValue
Link copied to clipboard
@Serializable
@SerialName(value = "str")
data class Str(val value: String) : JsonValue