requireField

inline fun <T> JsonMap.requireField(key: String): T

Gets the field with the given key from the JsonMap, ensuring it is non-null.

Throws

if an invalid type is specified, or if the field is null or missing.