W3cubDocs

/Kotlin

Json

Platform and version requirements: JS (1.1)
interface Json

An interface for indexing access to a collection of key-value pairs, where type of key is String and type of value is Any?.

Functions

Platform and version requirements: JS (1.1)

get

Calls to the function will be translated to indexing operation (square brackets) on the receiver with propertyName as the argument.

abstract operator fun get(propertyName: String): Any?
Platform and version requirements: JS (1.1)

set

Calls of the function will be translated to an assignment of value to the receiver indexed (with square brackets/index operation) with propertyName.

abstract operator fun set(propertyName: String, value: Any?)

Extension Functions

Platform and version requirements: JS (1.1)

add

Adds key-value pairs from other to this. Returns the original receiver.

fun Json.add(other: Json): Json

© 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/-json/index.html