fetchList

open fun <T> fetchList(searchKey: String): ArrayList<T>

Method to get from JSONArray a list of values automatically

Return

list of values as ArrayList of T, if it is not exist will return null

Parameters

searchKey

: key for value to fetch


open fun <T, V : ArrayList<out Any>?> fetchList(searchKey: String, defValue: V): ArrayList<T>

Method to get from JSONArray a list of values automatically

Return

list of values as ArrayList of T, if it is not exist will return null

Parameters

searchKey

: key for value to fetch

defValue

: default value to return if not found what searched


open fun <T> fetchList(source: JSONObject, searchKey: String): ArrayList<T>

Method to get from JSONArray a list of values automatically

Return

list of values as ArrayList of T, if it is not exist will return null

Parameters

source

: JSONObject source to search the JSONArray from fetch the list

searchKey

: key for value to fetch


open fun <T, V : ArrayList<out Any>?> fetchList(source: JSONObject, searchKey: String, defValue: V): ArrayList<T>

Method to get from JSONArray a list of values automatically

Return

list of values as ArrayList of T, if it is not exist will return null

Parameters

source

: JSONObject source to search the JSONArray from fetch the list

searchKey

: key for value to fetch

defValue

: default value to return if not found what searched