public class JSONArray
extends java.util.ArrayList
| Constructor and Description |
|---|
JSONArray()
Constructs an empty JSONArray.
|
JSONArray(java.util.Collection c)
Constructs a JSONArray containing the elements of the specified
collection, in the order they are returned by the collection's iterator.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
toJSONString(java.util.List<?> list)
Convert a list to JSON text.
|
java.lang.String |
toString() |
static void |
writeJSONString(java.util.List<?> list,
java.io.Writer out)
Encode a list into JSON text and write it to out.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizepublic JSONArray()
public JSONArray(java.util.Collection c)
c - the collection whose elements are to be placed into this JSONArraypublic static void writeJSONString(java.util.List<?> list,
java.io.Writer out)
throws java.io.IOException
java.io.IOExceptionJSONValue.writeJSONString(Object, Writer)public static java.lang.String toJSONString(java.util.List<?> list)
JSONValue.toJSONString(Object)public java.lang.String toString()
toString in class java.util.AbstractCollectionCopyright © 2018. All Rights Reserved.