---
title: "set"
sidebar_label: "set"
description: "Kotlin binding reference: set."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[Json](index.md)/[set](set.md)

# set

[common]\
fun [set](set.md)(key: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), value: [Json](index.md)): [Json](index.md)

Set the member [key](set.md) to a copy of [value](set.md), turning a null into an object first. Returns this for chaining.

[common]\
fun [set](set.md)(key: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), value: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)): [Json](index.md)

Set the member [key](set.md) to a boolean.

[common]\
fun [set](set.md)(key: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), value: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)): [Json](index.md)

Set the member [key](set.md) to an integer.

[common]\
fun [set](set.md)(key: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), value: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)): [Json](index.md)

Set the member [key](set.md) to a floating-point number.

[common]\
fun [set](set.md)(key: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), value: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)): [Json](index.md)

Set the member [key](set.md) to a string.