int

fun Json.int(): Int

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

Throws

if JSON structure does not match expected type.


fun Json.int(key: String): Int

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

Throws

if JSON structure does not match expected type