getBoolean

open fun getBoolean(key: String): Boolean

Method to get from JSONObject a boolean value

Return

value as boolean, if it is not exist will return false value

Parameters

key

: key of boolean value to get from json

Throws

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


open fun getBoolean(key: String, defValue: Boolean): Boolean

Method to get from JSONObject a boolean value

Return

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

Parameters

key

: key of boolean 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 false as default value


open fun getBoolean(index: Int): Boolean

Method to get from JSONArray a boolean value

Return

value as boolean, if it is not exist will return false value

Parameters

index

: index of boolean value to get from json


open fun getBoolean(index: Int, defValue: Boolean): Boolean

Method to get from JSONArray a boolean value

Return

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

Parameters

index

: index of boolean value to get from json

defValue

: default value to return if primary value not exists


open fun getBoolean(jsonDetails: JSONObject, key: String): Boolean

Method to get from JSONObject a boolean value

Return

value as boolean, if it is not exist will return false value

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of boolean value to get from json

Throws

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


open fun getBoolean(jsonDetails: JSONObject, key: String, defValue: Boolean): Boolean

Method to get from JSONObject a boolean value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

key

: key of boolean 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 false as default value


open fun getBoolean(jsonDetails: JSONArray, index: Int): Boolean

Method to get from JSONArray a boolean value

Return

value as boolean, if it is not exist will return false value

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of boolean value to get from json


open fun getBoolean(jsonDetails: JSONArray, index: Int, defValue: Boolean): Boolean

Method to get from JSONArray a boolean value

Return

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

Parameters

jsonDetails

: "JSON" from fetch data

index

: index of boolean value to get from json

defValue

: default value to return if primary value not exists