Uses of Class
net.sf.json.JSONArray
-
Packages that use JSONArray Package Description net.sf.json The core of the librarynet.sf.json.test Testing utilitiesnet.sf.json.util Miscelaneous utilities -
-
Uses of JSONArray in net.sf.json
Methods in net.sf.json that return JSONArray Modifier and Type Method Description protected JSONArray
JSONArray. addString(java.lang.String str)
Adds a String without performing any conversion on it.JSONArray
JSONArray. discard(int index)
Remove an element, if present.JSONArray
JSONArray. discard(java.lang.Object o)
Remove an element, if present.JSONArray
JSONArray. element(boolean value)
Append a boolean value.JSONArray
JSONArray. element(double value)
Append a double value.JSONArray
JSONArray. element(int value)
Append an int value.JSONArray
JSONArray. element(int index, boolean value)
Put or replace a boolean value in the JSONArray.JSONArray
JSONArray. element(int index, double value)
Put or replace a double value.JSONArray
JSONArray. element(int index, int value)
Put or replace an int value.JSONArray
JSONArray. element(int index, long value)
Put or replace a long value.JSONArray
JSONArray. element(int index, java.lang.Object value)
Put or replace an object value in the JSONArray.JSONArray
JSONArray. element(int index, java.lang.Object value, JsonConfig jsonConfig)
Put or replace an object value in the JSONArray.JSONArray
JSONArray. element(int index, java.lang.String value)
Put or replace a String value in the JSONArray.JSONArray
JSONArray. element(int index, java.lang.String value, JsonConfig jsonConfig)
Put or replace a String value in the JSONArray.JSONArray
JSONArray. element(int index, java.util.Collection value)
Put a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection.JSONArray
JSONArray. element(int index, java.util.Collection value, JsonConfig jsonConfig)
Put a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection.JSONArray
JSONArray. element(int index, java.util.Map value)
Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map.JSONArray
JSONArray. element(int index, java.util.Map value, JsonConfig jsonConfig)
Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map.JSONArray
JSONArray. element(long value)
Append an long value.JSONArray
JSONArray. element(java.lang.Object value)
Append an object value.JSONArray
JSONArray. element(java.lang.Object value, JsonConfig jsonConfig)
Append an object value.JSONArray
JSONArray. element(java.lang.String value)
Append a String value.JSONArray
JSONArray. element(java.lang.String value, JsonConfig jsonConfig)
Append a String value.JSONArray
JSONArray. element(java.util.Collection value)
Append a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection.JSONArray
JSONArray. element(java.util.Collection value, JsonConfig jsonConfig)
Append a value in the JSONArray, where the value will be a JSONArray which is produced from a Collection.JSONArray
JSONArray. element(java.util.Map value)
Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map.JSONArray
JSONArray. element(java.util.Map value, JsonConfig jsonConfig)
Put a value in the JSONArray, where the value will be a JSONObject which is produced from a Map.JSONArray
JSONArray. element(JSONNull value)
Append an JSON value.JSONArray
JSONArray. element(JSONObject value)
Append an JSON value.static JSONArray
JSONArray. fromObject(java.lang.Object object)
Creates a JSONArray.
Inspects the object type to call the correct JSONArray factory method.static JSONArray
JSONArray. fromObject(java.lang.Object object, JsonConfig jsonConfig)
Creates a JSONArray.
Inspects the object type to call the correct JSONArray factory method.JSONArray
JSONArray. getJSONArray(int index)
Get the JSONArray associated with an index.JSONArray
JSONObject. getJSONArray(java.lang.String key)
Get the JSONArray value associated with a key.JSONArray
JSONObject. names()
Produce a JSONArray containing the names of the elements of this JSONObject.JSONArray
JSONObject. names(JsonConfig jsonConfig)
Produce a JSONArray containing the names of the elements of this JSONObject.JSONArray
JSONArray. optJSONArray(int index)
Get the optional JSONArray associated with an index.JSONArray
JSONObject. optJSONArray(java.lang.String key)
Get an optional JSONArray associated with a key.JSONArray
JSONObject. toJSONArray(JSONArray names)
Produce a JSONArray containing the values of the members of this JSONObject.Methods in net.sf.json with parameters of type JSONArray Modifier and Type Method Description static int[]
JSONArray. getDimensions(JSONArray jsonArray)
Returns the number of dimensions suited for a java array.static java.lang.Object
JSONArray. toArray(JSONArray jsonArray)
Creates a java array from a JSONArray.static java.lang.Object
JSONArray. toArray(JSONArray jsonArray, java.lang.Class objectClass)
Creates a java array from a JSONArray.static java.lang.Object
JSONArray. toArray(JSONArray jsonArray, java.lang.Class objectClass, java.util.Map classMap)
Creates a java array from a JSONArray.
Any attribute is a JSONObject and matches a key in the classMap, it will be converted to that target class.
The classMap has the following conventions: Every key must be an String. Every value must be a Class. A key may be a regular expression.static java.lang.Object
JSONArray. toArray(JSONArray jsonArray, java.lang.Object root, JsonConfig jsonConfig)
Creates a java array from a JSONArray.static java.lang.Object
JSONArray. toArray(JSONArray jsonArray, JsonConfig jsonConfig)
Creates a java array from a JSONArray.static java.util.Collection
JSONArray. toCollection(JSONArray jsonArray)
Returns a List or a Set taking generics into account.static java.util.Collection
JSONArray. toCollection(JSONArray jsonArray, java.lang.Class objectClass)
Returns a List or a Set taking generics into account.static java.util.Collection
JSONArray. toCollection(JSONArray jsonArray, JsonConfig jsonConfig)
Returns a List or a Set taking generics into account.
Contributed by [Matt Small @ WaveMaker].JSONArray
JSONObject. toJSONArray(JSONArray names)
Produce a JSONArray containing the values of the members of this JSONObject.JSONObject
JSONArray. toJSONObject(JSONArray names)
Produce a JSONObject by combining a JSONArray of names with the values of this JSONArray.static java.util.List
JSONArray. toList(JSONArray jsonArray)
Deprecated.replaced by toCollectionstatic java.util.List
JSONArray. toList(JSONArray jsonArray, java.lang.Class objectClass)
Deprecated.replaced by toCollectionstatic java.util.List
JSONArray. toList(JSONArray jsonArray, java.lang.Class objectClass, java.util.Map classMap)
Deprecated.replaced by toCollectionstatic java.util.List
JSONArray. toList(JSONArray jsonArray, java.lang.Object root, JsonConfig jsonConfig)
Creates a List from a JSONArray.static java.util.List
JSONArray. toList(JSONArray jsonArray, JsonConfig jsonConfig)
Deprecated.replaced by toCollection -
Uses of JSONArray in net.sf.json.test
Methods in net.sf.json.test with parameters of type JSONArray Modifier and Type Method Description static void
JSONAssert. assertEquals(java.lang.String message, java.lang.String expected, JSONArray actual)
Asserts that two JSONArrays are equal.static void
JSONAssert. assertEquals(java.lang.String expected, JSONArray actual)
Asserts that two JSONArrays are equal.static void
JSONAssert. assertEquals(java.lang.String message, JSONArray expected, java.lang.String actual)
Asserts that two JSONArrays are equal.static void
JSONAssert. assertEquals(java.lang.String message, JSONArray expected, JSONArray actual)
Asserts that two JSONArrays are equal.static void
JSONAssert. assertEquals(JSONArray expected, java.lang.String actual)
Asserts that two JSONArrays are equal.static void
JSONAssert. assertEquals(JSONArray expected, JSONArray actual)
Asserts that two JSONArrays are equal. -
Uses of JSONArray in net.sf.json.util
Fields in net.sf.json.util declared as JSONArray Modifier and Type Field Description static JSONArray
CycleDetectionStrategy. IGNORE_PROPERTY_ARR
Methods in net.sf.json.util that return JSONArray Modifier and Type Method Description abstract JSONArray
CycleDetectionStrategy. handleRepeatedReferenceAsArray(java.lang.Object reference)
Handle a repeated reference
Must return a valid JSONArray or null.
-