auto Search

private open fun <T> autoSearch(json: JSONObject, searchKey: String): T

Method to get from JSONObject a generic value

Return

value as T, if it is not exist will return null

Parameters

json

: JSONObject from fetch data

searchKey

: key for value to fetch


private open fun <T> autoSearch(json: JSONObject, searchKey: String, defValue: T): T

Method to get from JSONObject a generic value

Return

value as T, if it is not exist will return defValue

Parameters

json

: JSONObject from fetch data

searchKey

: key for value to fetch

defValue

: default value to return if primary value not exists