asInt

open fun asInt(): Integer

Return the JSON object as integer.

Return

This object as integer or null if this object is not an integer.

See also


open fun asInt(def: Int): Int

Return the JSON object as integer.

Return

This object as integer or the provided value if this object is not an integer.

Parameters

def

Value to return if the JSON object is not an integer.

See also