Json Helper
The JsonHelper
class is a useful tool class to works with "JSON"
data format
Author
N7ghtm4r3 - Tecknobit
Constructors
Link copied to clipboard
Constructor to init JsonHelper tool class
constructor(jsonObjectSource: JSONObject)
Constructor to init JsonHelper tool class
constructor(jsonArraySource: JSONArray)
Constructor to init JsonHelper tool class
Constructor to init JsonHelper tool class
constructor(jsonObjectSource: JSONObject, jsonArraySource: JSONArray)
Constructor to init JsonHelper tool class
Properties
Link copied to clipboard
jsonArraySource
is instance that memorizes JSONArray to work onLink copied to clipboard
jsonObjectSource
is instance that memorizes JSONObject to work onLink copied to clipboard
NUMERIC_CLASS_CAST_ERROR_VALUE
is constant that memorizes default numeric value if ClassCastException has been thrownLink copied to clipboard
NUMERIC_DEF_VALUE_IF_MISSED
is constant that memorizes default numeric value if the main is missedFunctions
Link copied to clipboard
Method to assemble a list from JSONArray a generic value
Link copied to clipboard
Method to get from JSONObject a generic value
Link copied to clipboard
Method to check if a
"JSON"
source contains a specific keyLink copied to clipboard
open fun <T, V : ArrayList<out Any>?> fetchVList(searchKey: String, listKey: String, defValue: V): ArrayList<T>
open fun <T, V : ArrayList<out Any>?> fetchVList(json: JSONObject, searchKey: String, defValue: V): ArrayList<T>
open fun <T, V : ArrayList<out Any>?> fetchVList(json: JSONObject, searchKey: String, listKey: String, defValue: V): ArrayList<T>
Method to get from JSONObject a list of values automatically
Link copied to clipboard
Method to get from JSONArray an object value
Method to get from JSONObject an object value
Method to get from JSONObject an Object value
Link copied to clipboard
Method to get from JSONArray a BigDecimal value
Method to get from JSONObject a BigDecimal value
Link copied to clipboard
Method to get from JSONArray a BigInteger value
Method to get from JSONObject a BigInteger value
Link copied to clipboard
Method to get from JSONArray a boolean value
Method to get from JSONObject a boolean value
Link copied to clipboard
Method to get from JSONArray a double value
Method to get from JSONObject a double value
Link copied to clipboard
Method to get from JSONArray a float value
Method to get from JSONObject a float value
Link copied to clipboard
Method to get from JSONArray an int value
Method to get from JSONObject an int value
Link copied to clipboard
Method to get from JSONArray a list of values
Method to get from JSONObject a list of values
Link copied to clipboard
Method to get from JSON a jsonHelper
Link copied to clipboard
Method to get from JSONArray a jsonObject
Method to get from JSONObject a jsonObject
Link copied to clipboard
Method to get from JSONArray a long value
Method to get from JSONObject a long value
Link copied to clipboard
Method to get from JSONArray a Number value
Method to get from JSONObject a Number value
Link copied to clipboard
Method to get from JSONArray a string value
Method to get from JSONObject a string value
Link copied to clipboard
Method to set jsonArraySource instance
Link copied to clipboard
Method to set jsonObjectSource instance