RichUtils / pyxis.uzuki.live.richutilskt.utils / org.json.JSONObject

Extensions for org.json.JSONObject

getJSONBoolean

fun JSONObject.getJSONBoolean(name: String, def: Boolean = false): Boolean

get Boolean from JSONObject

getJSONDouble

fun JSONObject.getJSONDouble(name: String, def: Double = 0.toDouble()): Double

get Double from JSONObject

getJSONInt

fun JSONObject.getJSONInt(name: String, def: Int = 0): Int

get Int from JSONObject

getJSONLong

fun JSONObject.getJSONLong(name: String, def: Long = 0.toLong()): Long

get Long from JSONObject

getJSONString

fun JSONObject.getJSONString(name: String, def: String = ""): String

get String from JSONObject