api / tv.twelvetone.json / JsonObject / asObject

asObject

fun asObject(): JsonObject

Overrides JsonValue.asObject

Returns this JSON value as JsonObject, assuming that this value represents a JSON object. If this is not the case, an exception is thrown.

Exceptions

UnsupportedOperationException - if this value is not a JSON object

Return
a JSONObject for this value