key

open fun key(string: String): JSONWriter

Append a key. The key will be associated with the next value. In an object, every value must be preceded by a key.

Return

this

Parameters

string

A key string.

Throws

If the key is out of place. For example, keys do not belong in arrays or if the key is null.