Class JSONArray
java.lang.Object
java.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
org.json.simple.JSONArray
- All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess, SequencedCollection, JSONAware, JSONStreamAware
Deprecated.
A JSON array. JSONObject supports java.util.List interface.
- Author:
- FangYidong<fangyidong@yahoo.com.cn>
- See Also:
-
Field Summary
Fields inherited from class AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Constructs an empty JSONArray.Deprecated.Constructs a JSONArray containing the elements of the specified collection, in the order they are returned by the collection's iterator. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.static StringtoJSONString(boolean[] array) Deprecated.description omitted.static StringtoJSONString(byte[] array) Deprecated.description omitted.static StringtoJSONString(char[] array) Deprecated.description omitted.static StringtoJSONString(double[] array) Deprecated.description omitted.static StringtoJSONString(float[] array) Deprecated.description omitted.static StringtoJSONString(int[] array) Deprecated.description omitted.static StringtoJSONString(long[] array) Deprecated.description omitted.static StringtoJSONString(short[] array) Deprecated.description omitted.static StringtoJSONString(Object[] array) Deprecated.description omitted.static StringtoJSONString(Collection collection) Deprecated.Convert a list to JSON text.toString()Deprecated.Returns a string representation of this array.static voidwriteJSONString(boolean[] array, Writer out) Deprecated.description omitted.static voidwriteJSONString(byte[] array, Writer out) Deprecated.description omitted.static voidwriteJSONString(char[] array, Writer out) Deprecated.description omitted.static voidwriteJSONString(double[] array, Writer out) Deprecated.description omitted.static voidwriteJSONString(float[] array, Writer out) Deprecated.description omitted.static voidwriteJSONString(int[] array, Writer out) Deprecated.description omitted.static voidwriteJSONString(long[] array, Writer out) Deprecated.description omitted.static voidwriteJSONString(short[] array, Writer out) Deprecated.description omitted.voidwriteJSONString(Writer out) Deprecated.write JSON string to out.static voidwriteJSONString(Object[] array, Writer out) Deprecated.description omitted.static voidwriteJSONString(Collection collection, Writer out) Deprecated.Encode a list into JSON text and write it to out.Methods inherited from class 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 AbstractCollection
containsAllMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
containsAll, reversed
-
Constructor Details
-
JSONArray
-
JSONArray
Deprecated.Constructs a JSONArray containing the elements of the specified collection, in the order they are returned by the collection's iterator.- Parameters:
c- the collection whose elements are to be placed into this JSONArray
-
-
Method Details
-
writeJSONString
Deprecated.Encode a list into JSON text and write it to out. If this list is also a JSONStreamAware or a JSONAware, JSONStreamAware and JSONAware specific behaviours will be ignored at this top level.- Parameters:
collection- description omitted.out- description omitted.- Throws:
IOException- description omitted.- See Also:
-
writeJSONString
Deprecated.Description copied from interface:JSONStreamAwarewrite JSON string to out.- Specified by:
writeJSONStringin interfaceJSONStreamAware- Parameters:
out- description omitted.- Throws:
IOException- description omitted.
-
toJSONString
Deprecated.Convert a list to JSON text. The result is a JSON array. If this list is also a JSONAware, JSONAware specific behaviours will be omitted at this top level.- Parameters:
collection- description omitted.- Returns:
- JSON text, or "null" if list is null.
- See Also:
-
writeJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.out- description omitted.- Throws:
IOException- description omitted.
-
toJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.- Returns:
- description omitted.
-
writeJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.out- description omitted.- Throws:
IOException- description omitted.
-
toJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.- Returns:
- description omitted.
-
writeJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.out- description omitted.- Throws:
IOException- description omitted.
-
toJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.- Returns:
- description omitted.
-
writeJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.out- description omitted.- Throws:
IOException- description omitted.
-
toJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.- Returns:
- description omitted.
-
writeJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.out- description omitted.- Throws:
IOException- description omitted.
-
toJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.- Returns:
- description omitted.
-
writeJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.out- description omitted.- Throws:
IOException- description omitted.
-
toJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.- Returns:
- description omitted.
-
writeJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.out- description omitted.- Throws:
IOException- description omitted.
-
toJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.- Returns:
- description omitted.
-
writeJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.out- description omitted.- Throws:
IOException- description omitted.
-
toJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.- Returns:
- description omitted.
-
writeJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.out- description omitted.- Throws:
IOException- description omitted.
-
toJSONString
Deprecated.description omitted.- Parameters:
array- description omitted.- Returns:
- description omitted.
-
toJSONString
Deprecated.- Specified by:
toJSONStringin interfaceJSONAware- Returns:
- JSON text
-
toString
Deprecated.Returns a string representation of this array. This is equivalent to callingtoJSONString().- Overrides:
toStringin classAbstractCollection
-
JsonArray