getDouble

open fun getDouble(key: String): Double

Method to get from JSONObject a double value

Return

value as double, if it is not exist will return NUMERIC_DEF_VALUE_IF_MISSED

Parameters

key

: key of double value to get from json

Throws

: when this exception has been thrown will be returned NUMERIC_CLASS_CAST_ERROR_VALUE as default value


open fun getDouble(key: String, defValue: Double): Double

Method to get from JSONObject a double value

Return

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

Parameters

key

: key of double value to get from json

defValue

: default value to return if primary value not exists

Throws

: when this exception has been thrown will be returned NUMERIC_CLASS_CAST_ERROR_VALUE as default value


open fun getDouble(jsonDetails: JSONObject, key: String): Double

Method to get from JSONObject a double value

Return

value as double, if it is not exist will return NUMERIC_DEF_VALUE_IF_MISSED

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of double value to get from json

Throws

: when this exception has been thrown will be returned NUMERIC_CLASS_CAST_ERROR_VALUE as default value


open fun getDouble(jsonDetails: JSONObject, key: String, defValue: Double): Double

Method to get from JSONObject a double value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of double value to get from json

defValue

: default value to return if primary value not exists

Throws

: when this exception has been thrown will be returned NUMERIC_CLASS_CAST_ERROR_VALUE as default value


open fun getDouble(index: Int): Double

Method to get from JSONArray a double value

Return

value as double, if it is not exist will return NUMERIC_DEF_VALUE_IF_MISSED

Parameters

index

: index of double value to get from json


open fun getDouble(index: Int, defValue: Double): Double

Method to get from JSONArray a double value

Return

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

Parameters

index

: index of double value to get from json

defValue

: default value to return if primary value not exists


open fun getDouble(jsonDetails: JSONArray, index: Int): Double

Method to get from JSONArray a double value

Return

value as double, if it is not exist will return NUMERIC_DEF_VALUE_IF_MISSED

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of double value to get from json


open fun getDouble(jsonDetails: JSONArray, index: Int, defValue: Double): Double

Method to get from JSONArray a double value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of double value to get from json

defValue

: default value to return if primary value not exists