api / tv.twelvetone.json / JsonValue / asBoolean

asBoolean

open fun asBoolean(): Boolean

Returns this JSON value as a boolean value, assuming that this value is either true or false. If this is not the case, an exception is thrown.

Exceptions

UnsupportedOperationException - if this value is neither true or false

Return
this value as boolean