Class JSONArray
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Object>,Collection<Object>,List<Object>,RandomAccess,SequencedCollection<Object>,JSONStructure
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSerialize given JSON structure to string.toString()voidwriteJSONString(Writer writer) Serialize this JSON structure to aWriter.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAllMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
JSONArray
public JSONArray() -
JSONArray
public JSONArray(int initialCapacity) -
JSONArray
-
-
Method Details
-
toJSONString
Description copied from interface:JSONStructureSerialize given JSON structure to string. Can be used for debugging or small JSON data, but streaming the JSON intoWriteris preferred.- Specified by:
toJSONStringin interfaceJSONStructure- Returns:
-
writeJSONString
Description copied from interface:JSONStructureSerialize this JSON structure to aWriter.- Specified by:
writeJSONStringin interfaceJSONStructure- Parameters:
writer-- Throws:
IOException
-
toString
- Overrides:
toStringin classAbstractCollection<Object>
-