long

fun Json.long(): Long

Interprets given Json as JsonNumber and returns its value as Long.

Throws

if JSON structure does not match expected type.


fun Json.long(key: String): Long

Interprets given Json as JsonObject. Interprets value of given key as JsonNumber. Returns its value as Long.

Throws

if JSON structure does not match expected type