stringify

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

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

Parameters

value

A JavaScript value, usually an object or array, to be converted.

replacer

A function that transforms the results.

space

Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.


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


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

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

Parameters

value

A JavaScript value, usually an object or array, to be converted.

replacer

An array of strings and numbers that acts as an approved list for selecting the object properties that will be stringified.

space

Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.