kotlinx-serialization / kotlinx.serialization.json / int

int

(common, js, jvm, native) val JsonElement.int: Int

Convenience method, returns content of current element as Int

Exceptions

JsonException - if current element is not a JsonPrimitive

NumberFormatException - if current element is JsonPrimitive but it is not a valid representation of number