W3cubDocs

/Kotlin

JSON

Platform and version requirements: JS (1.1)
object JSON

Exposes the JavaScript JSON object to Kotlin.

Functions

Platform and version requirements: JS (1.1)

parse

fun <T> parse(text: String): T
fun <T> parse(
    text: String, 
    reviver: (key: String, value: Any?) -> Any?
): T
Platform and version requirements: JS (1.1)

stringify

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

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-j-s-o-n/index.html