sealed class JsonPrimitive : JsonElement
Class representing JSON primitive value. Can be either JsonLiteral or JsonNull.
(common, js, jvm, native)
boolean |
Returns content of current element as boolean val boolean: Boolean |
(common, js, jvm, native)
booleanOrNull |
Returns content of current element as boolean or val booleanOrNull: Boolean? |
(common, js, jvm, native)
content |
Content of given element without quotes. For JsonNull this methods returns abstract val content: String |
(common, js, jvm, native)
contentOrNull |
Content of the given element without quotes or abstract val contentOrNull: String? |
(common, js, jvm, native)
double |
Returns content of current element as double val double: Double |
(common, js, jvm, native)
doubleOrNull |
Returns content of current element as double or val doubleOrNull: Double? |
(common, js, jvm, native)
float |
Returns content of current element as float val float: Float |
(common, js, jvm, native)
floatOrNull |
Returns content of current element as float or val floatOrNull: Float? |
(common, js, jvm, native)
int |
Returns content of current element as int val int: Int |
(common, js, jvm, native)
intOrNull |
Returns content of current element as int or val intOrNull: Int? |
(common, js, jvm, native)
long |
Returns content of current element as long val long: Long |
(common, js, jvm, native)
longOrNull |
Returns content of current element as long or val longOrNull: Long? |
(common, js, jvm, native)
primitive |
Convenience method to get current element as JsonPrimitive val primitive: JsonPrimitive |
(common, js, jvm, native)
toString |
open fun toString(): String |
(common, js, jvm, native)
JsonLiteral |
Class representing JSON literals: numbers, booleans and string. Strings are always quoted. class JsonLiteral : JsonPrimitive |
(common, js, jvm, native)
JsonNull |
Class representing JSON object JsonNull : JsonPrimitive |