required

inline fun <T> required(key: String): T

Returns the value for key decoded as type T.

Parameters

key

The JSON key to look up.

Throws

if the value cannot be decoded as T.