getJSONObject

open fun getJSONObject(jsonDetails: JSONObject, key: String): JSONObject

Method to get from JSONObject a jsonObject

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of JSONObject to get from json

Throws

: when this exception has been trowed will be returned null as default value


open fun getJSONObject(jsonDetails: JSONObject, key: String, defValue: JSONObject): JSONObject

Method to get from JSONObject a jsonObject

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of JSONObject to get from json

defValue

: default value to return if primary value not exists

Throws

: when this exception has been trowed will be returned null as default value


open fun getJSONObject(jsonDetails: JSONArray, index: Int): JSONObject

Method to get from JSONArray a jsonObject

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of JSONObject to get from json


open fun getJSONObject(jsonDetails: JSONArray, index: Int, defValue: JSONObject): JSONObject

Method to get from JSONArray a jsonObject

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of JSONObject to get from json

defValue

: default value to return if primary value not exists


open fun getJSONObject(key: String): JSONObject

Method to get from JSONObject a jsonObject

Return

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

Parameters

key

: key of JSONObject to get from json

Throws

: when this exception has been trowed will be returned null as default value


open fun getJSONObject(key: String, defValue: JSONObject): JSONObject

Method to get from JSONObject a jsonObject

Return

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

Parameters

key

: key of JSONObject to get from json

defValue

: default value to return if primary value not exists

Throws

: when this exception has been trowed will be returned null as default value


open fun getJSONObject(index: Int): JSONObject

Method to get from JSONArray a jsonObject

Return

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

Parameters

index

: index of JSONObject to get from json


open fun getJSONObject(index: Int, defValue: JSONObject): JSONObject

Method to get from JSONArray a jsonObject

Return

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

Parameters

index

: index of JSONObject to get from json

defValue

: default value to return if primary value not exists