Class JSONArray
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
org.jfree.data.json.impl.JSONArray
- All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess, JSONAware, JSONStreamAware
A JSON array.
This class is for internal use by JFreeChart, it is not part of the supported API and you should not call it directly. If you need JSON support in your project you should include JSON.simple (https://code.google.com/p/json-simple/) or some other JSON library directly in your project.
This class is for internal use by JFreeChart, it is not part of the supported API and you should not call it directly. If you need JSON support in your project you should include JSON.simple (https://code.google.com/p/json-simple/) or some other JSON library directly in your project.
- See Also:
-
Field Summary
FieldsFields inherited from class AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a JSON string representation of this list.static StringtoJSONString(List list) Convert a list to JSON text.toString()Returns a string representation of this list.voidwriteJSONString(Writer out) Writes this array to the specified output writer.static voidwriteJSONString(List list, Writer out) Encode a list into JSON text and write it to out.Methods inherited from class ArrayList
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, trimToSizeMethods inherited from class AbstractList
equals, hashCodeMethods inherited from class AbstractCollection
containsAllMethods inherited from interface Collection
parallelStream, removeIf, streamMethods inherited from interface List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
-
Constructor Details
-
JSONArray
public JSONArray()
-
-
Method Details
-
writeJSONString
Encode a list into JSON text and write it to out. If this list is also aJSONStreamAwareor aJSONAware,JSONStreamAwareandJSONAwarespecific behaviours will be ignored at this top level.- Parameters:
list- the list (nullpermitted).out- the output writer (nullnot permitted).- Throws:
IOException- if there is an I/O problem.- See Also:
-
writeJSONString
Writes this array to the specified output writer.- Specified by:
writeJSONStringin interfaceJSONStreamAware- Parameters:
out- the output writer (nullnot permitted).- Throws:
IOException- if there is an I/O problem.
-
toJSONString
-
toJSONString
Returns a JSON string representation of this list.- Specified by:
toJSONStringin interfaceJSONAware- Returns:
- A string.
-
toString
Returns a string representation of this list.- Overrides:
toStringin classAbstractCollection- Returns:
- A string.
-