Skip to main content

//clika-runtime/io.clika.runtime/Json/Companion

Companion

[common]
object Companion

Functions​

NameSummary
newArray[common]
fun newArray(): Json
An empty array, ready for add.
newObject[common]
fun newObject(): Json
An empty object, ready for set.
of[common]
fun of(value: Boolean): Json
A boolean value.
[common]
fun of(value: Double): Json
A floating-point value.
[common]
fun of(value: Long): Json
An integer value.
[common]
fun of(value: String): Json
A string value.
ofNull[common]
fun ofNull(): Json
The null value.
parse[common]
fun parse(text: String): Json
Parse JSON text; malformed text fails with INVALID_ARGUMENT.
readFile[common]
fun readFile(path: String): Json
Read and parse a JSON file.