jsonArray.add(Json value);
jsonArray.add(String value);
jsonArray.add(Number value);
jsonArray.add(boolean value);
Appends a value to a JSON array.
jsonObject.add(String key, Json value);
jsonObject.add(String key, String value);
jsonObject.add(String key, Number value);
jsonObject.add(String key, boolean value);
Adds a key-value pair to a JSON object.
Json jsonArray = Json.array();
Creates an empty JSON array.
Converts a JSON array into a list of Json objects.
Extracts a boolean value from a JSON primitive.
Extracts a double value from a JSON primitive.
Extracts an integer value from a JSON primitive.
Extracts a long value from a JSON primitive.
Extracts a string value from a JSON primitive.
Retrieves a JSON element by key. Returns a JSON null object if the key doesn't exist.
Checks if a JSON object has a specific key.
Creates an empty JSON object.
Parses a JSON-formatted string into a Json object.
Extracts the keys from a json object.
Returns the JSON object as a formatted string.
Returns the type of JSON element. [OBJECT, ARRAY, STRING, NUMBER, BOOLEAN, NULL]
Last updated