jsonkraken / net.jemzart.jsonkraken / JsonPrimitive

JsonPrimitive

sealed class JsonPrimitive<T> : JsonValue

Since
2.0 Represents a json primitive, either a boolean, string, number or null.

Properties

value

abstract val value: T

Functions

get

open operator fun get(key: String): JsonValue
open operator fun get(index: Int): JsonValue

set

open operator fun set(key: String, value: Any?): Unit
open operator fun set(index: Int, value: Any?): Unit

Inherited Functions

cast

fun <T> cast(): T

toString

open fun toString(): String

Inheritors

JsonBoolean

sealed class JsonBoolean : JsonPrimitive<Boolean>

JsonNull

object JsonNull : JsonPrimitive<Nothing?>

JsonNumber

class JsonNumber : JsonPrimitive<String>

JsonString

class JsonString : JsonPrimitive<String>