JsonObject

class JsonObject(content: Map<String, JsonElement>) : JsonElement, Map<String, JsonElement>

Class representing JSON object, consisting of name-value pairs, where value is arbitrary JsonElement

Since this class also implements Map interface, you can use traditional methods like Map.get or Map.getValue to obtain Json elements.

Constructors

Link copied to clipboard
fun JsonObject(content: Map<String, JsonElement>)

Functions

Link copied to clipboard
open override fun containsKey(key: String): Boolean
Link copied to clipboard
open override fun containsValue(value: JsonElement): Boolean
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open operator override fun get(key: String): JsonElement?
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
open override val entries: Set<Map.Entry<String, JsonElement>>
Link copied to clipboard
open override val keys: Set<String>
Link copied to clipboard
open override val size: Int
Link copied to clipboard
open override val values: Collection<JsonElement>