JSON

external object JSON(source)

Functions

Link copied to clipboard
fun <T : Any> parse(text: String, reviver: (key: String, value: Any?) -> Any? = definedExternally): T

Converts a JavaScript Object Notation (JSON) string into an object.

Link copied to clipboard
fun stringify(value: Any?, replacer: ReadonlyArray<Any> = definedExternally, space: Int = definedExternally): String
fun stringify(value: Any?, replacer: (key: String, value: Any?) -> Any? = definedExternally, space: Int = definedExternally): String

fun stringify(value: Any?, replacer: ReadonlyArray<Any> = definedExternally, space: String = definedExternally): String
fun stringify(value: Any?, replacer: (key: String, value: Any?) -> Any? = definedExternally, space: String = definedExternally): String

Converts a JavaScript value to a JavaScript Object Notation (JSON) string.