getNumber

open fun getNumber(key: String): Number

Method to get from JSONObject a Number value

Return

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

Parameters

key

: key of Number value to get from json

Throws

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


open fun getNumber(key: String, defValue: Number): Number

Method to get from JSONObject a Number value

Return

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

Parameters

key

: key of Number 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 getNumber(jsonDetails: JSONObject, key: String): Number

Method to get from JSONObject a Number value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of Number value to get from json

Throws

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


open fun getNumber(jsonDetails: JSONObject, key: String, defValue: Number): Number

Method to get from JSONObject a Number value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of Number 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 getNumber(index: Int): Number

Method to get from JSONArray a Number value

Return

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

Parameters

index

: index of Number value to get from json


open fun getNumber(index: Int, defValue: Number): Number

Method to get from JSONArray a Number value

Return

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

Parameters

index

: index of Number value to get from json

defValue

: default value to return if primary value not exists


open fun getNumber(jsonDetails: JSONArray, index: Int): Number

Method to get from JSONArray a Number value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of Number value to get from json


open fun getNumber(jsonDetails: JSONArray, index: Int, defValue: Number): Number

Method to get from JSONArray a Number value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of Number value to get from json

defValue

: default value to return if primary value not exists