getLong

open fun getLong(key: String): Long

Method to get from JSONObject a long value

Return

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

Parameters

key

: key of long 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 getLong(key: String, defValue: Long): Long

Method to get from JSONObject a long value

Return

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

Parameters

key

: key of long 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 getLong(jsonDetails: JSONObject, key: String): Long

Method to get from JSONObject a long value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of long 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 getLong(jsonDetails: JSONObject, key: String, defValue: Long): Long

Method to get from JSONObject a long value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of long 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 getLong(index: Int): Long

Method to get from JSONArray a long value

Return

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

Parameters

index

: index of long value to get from json


open fun getLong(index: Int, defValue: Long): Long

Method to get from JSONArray a long value

Return

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

Parameters

index

: index of long value to get from json

defValue

: default value to return if primary value not exists


open fun getLong(jsonDetails: JSONArray, index: Int): Long

Method to get from JSONArray a long value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of long value to get from json


open fun getLong(jsonDetails: JSONArray, index: Int, defValue: Long): Long

Method to get from JSONArray a long value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of long value to get from json

defValue

: default value to return if primary value not exists