Package | Description |
---|---|
net.sf.json |
The core of the library
|
net.sf.json.test |
Testing utilities
|
net.sf.json.util |
Miscelaneous utilities
|
Modifier and Type | Method and Description |
---|---|
protected JSONArray |
JSONArray.addString(java.lang.String str)
Adds a String without performing any conversion on it.
|
JSONArray |
JSONArray.element(boolean value)
Append a boolean 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(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,
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,
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.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(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(JSONNull value)
Append an JSON value.
|
JSONArray |
JSONArray.element(JSONObject value)
Append an JSON value.
|
JSONArray |
JSONArray.element(long value)
Append an long value.
|
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(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.
|
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 |
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.
|
Modifier and Type | Method and Description |
---|---|
V |
DelegatingValueVisitor.accept(JSONArray a) |
abstract V |
ValueVisitor.accept(JSONArray a) |
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,
JsonConfig jsonConfig)
Creates a java array from a JSONArray.
|
static java.lang.Object |
JSONArray.toArray(JSONArray jsonArray,
java.lang.Object root,
JsonConfig jsonConfig)
Creates a java array from a JSONArray.
|
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)
Creates a List from a JSONArray.
|
static java.util.List |
JSONArray.toList(JSONArray jsonArray,
java.lang.Class objectClass)
Creates a List from a JSONArray.
|
static java.util.List |
JSONArray.toList(JSONArray jsonArray,
java.lang.Class objectClass,
java.util.Map classMap)
Creates a List 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.util.List |
JSONArray.toList(JSONArray jsonArray,
JsonConfig jsonConfig)
Creates a List from a JSONArray.
|
static java.util.List |
JSONArray.toList(JSONArray jsonArray,
java.lang.Object root,
JsonConfig jsonConfig)
Creates a List from a JSONArray.
|
Modifier and Type | Method and Description |
---|---|
static void |
JSONAssert.assertEquals(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(java.lang.String expected,
JSONArray 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(java.lang.String message,
JSONArray expected,
java.lang.String actual)
Asserts that two JSONArrays are equal.
|
static void |
JSONAssert.assertEquals(java.lang.String message,
java.lang.String expected,
JSONArray actual)
Asserts that two JSONArrays are equal.
|
Modifier and Type | Method and Description |
---|---|
abstract JSONArray |
CycleDetectionStrategy.handleRepeatedReferenceAsArray(java.lang.Object reference)
Handle a repeated reference
Must return a valid JSONArray or null. |
Copyright © 2006-2014 Json-lib. All Rights Reserved.