kotlinx-serialization / kotlinx.serialization.json / JsonObjectBuilder / to

to

(common, js, jvm, native) infix fun String.to(value: JsonElement): Unit

Adds given value to the current JsonObject with this as a key.

(common, js, jvm, native) infix fun String.to(value: Number?): Unit
infix fun String.to(value: Boolean?): Unit
infix fun String.to(value: String?): Unit

Adds given value as JsonPrimitive to the current JsonObject with this as a key.