Package com.sdicons.json.model
Class JSONArray
java.lang.Object
com.sdicons.json.model.JSONValue
com.sdicons.json.model.JSONComplex
com.sdicons.json.model.JSONArray
Represents a JSON array (list), an ordered list of values ...
Example:
[ "one", "two", "tree" ]
is an array of 3 strings.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
array
-
-
Constructor Details
-
JSONArray
public JSONArray()
-
-
Method Details
-
size
public int size()- Specified by:
size
in classJSONComplex
- Returns:
- The length of the array (list).
-
getValue
- Returns:
- The JSON elements in the array (list).
-
toString
-
get
Utility method, get an element at a specific position in the list. You do not have to get the list value first with getValue() first.- Parameters:
i
- Index of the element to return.- Returns:
- Returns the element at the specified position in this list.
- Throws:
IndexOutOfBoundsException
- When there is no element at the specified position.
-
render
Description copied from class:JSONValue
Convert the JSON value into a string representation (JSON representation). -
equals
-
hashCode
public int hashCode() -
strip
Remove all JSON information. In the case of a JSONString, a Java String is returned. The elements of the array are stripped as well.
-