ChildNode

sealed interface ChildNode

One entry in a node's children array.

A child may be raw text, a number, JSON null, or a nested element — the four JSON forms a children array can hold, each kept as a distinct typed variant.

Inheritors

Types

Link copied to clipboard
data class Element(val node: Node) : ChildNode

A nested element child wrapping a Node.

Link copied to clipboard
data object Null : ChildNode

A JSON null child.

Link copied to clipboard
data class Numeric(val value: Double) : ChildNode

A numeric child (a JSON number), held as a Double.

Link copied to clipboard
data class Text(val value: String) : ChildNode

A text child (a JSON string).