api / tv.twelvetone.json / JsonValue / asObject

asObject

open fun asObject(): JsonObject

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