class JsonLiteral : JsonPrimitive
Class representing JSON literals: numbers, booleans and string. Strings are always quoted.
isString indicates whether literal was explicitly constructed as a String and
whether it should be serialized as one. E.g. JsonLiteral("42", false)
and JsonLiteral("42", true)
will be serialized as 42
and "42"
respectively.
(common, js, jvm, native)
<init> |
Creates number literal <init>(number: Number)
Creates boolean literal <init>(boolean: Boolean)
Creates quoted string literal <init>(string: String) |
(common, js, jvm, native)
content |
Content of given element without quotes. For JsonNull this methods returns val content: String |
(common, js, jvm, native)
contentOrNull |
Content of the given element without quotes or val contentOrNull: String |
(common, js, jvm, native)
isString |
val isString: Boolean |
(common, js, jvm, native)
equals |
fun equals(other: Any?): Boolean |
(common, js, jvm, native)
hashCode |
fun hashCode(): Int |
(common, js, jvm, native)
toString |
fun toString(): String |