public class JSONArray extends ArrayList
modCount
Constructor and Description |
---|
JSONArray()
Constructs an empty JSONArray.
|
JSONArray(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 String |
toJSONString(List<?> list)
Convert a list to JSON text.
|
String |
toString() |
static void |
writeJSONString(List<?> list,
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, trimToSize
equals, hashCode
containsAll
finalize, getClass, notify, notifyAll, wait, wait, wait
containsAll, equals, hashCode
parallelStream, stream
public JSONArray()
public JSONArray(Collection c)
c
- the collection whose elements are to be placed into this JSONArraypublic static void writeJSONString(List<?> list, Writer out) throws IOException
IOException
JSONValue.writeJSONString(Object, Writer)
public static String toJSONString(List<?> list)
JSONValue.toJSONString(Object)
public String toString()
toString
in class AbstractCollection
Copyright © 2019. All rights reserved.