get

open fun get(key: String): Any

Method to get from JSONObject an object value

Return

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

Parameters

key

: key of Object value to get from json

Throws

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


open fun get(key: String, defValue: Any): Any

Method to get from JSONObject an object value

Return

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

Parameters

key

: key of Object value 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 get(jsonDetails: JSONObject, key: String): Any

Method to get from JSONObject an Object value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of Object value to get from json

Throws

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


open fun get(jsonDetails: JSONObject, key: String, defValue: Any): Any

Method to get from JSONObject an Object value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of Object value 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 get(index: Int): Any

Method to get from JSONArray an object value

Return

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

Parameters

index

: index of Object value to get from json


open fun get(index: Int, defValue: Any): Any

Method to get from JSONArray an object value

Return

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

Parameters

index

: index of Object value to get from json

defValue

: default value to return if primary value not exists


open fun get(jsonDetails: JSONArray, index: Int): Any

Method to get from JSONArray an object value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of Object value to get from json


open fun get(jsonDetails: JSONArray, index: Int, defValue: Any): Any

Method to get from JSONArray an object value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of Object value to get from json

defValue

: default value to return if primary value not exists