Package org.json.simple
Class JSONArray
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
org.json.simple.JSONArray
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable
,Collection
,List
,RandomAccess
,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 java.util.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 String
toJSONString
(boolean[] array) Deprecated.description omitted.static String
toJSONString
(byte[] array) Deprecated.description omitted.static String
toJSONString
(char[] array) Deprecated.description omitted.static String
toJSONString
(double[] array) Deprecated.description omitted.static String
toJSONString
(float[] array) Deprecated.description omitted.static String
toJSONString
(int[] array) Deprecated.description omitted.static String
toJSONString
(long[] array) Deprecated.description omitted.static String
toJSONString
(short[] array) Deprecated.description omitted.static String
toJSONString
(Object[] array) Deprecated.description omitted.static String
toJSONString
(Collection collection) Deprecated.Convert a list to JSON text.toString()
Deprecated.Returns a string representation of this array.static void
writeJSONString
(boolean[] array, Writer out) Deprecated.description omitted.static void
writeJSONString
(byte[] array, Writer out) Deprecated.description omitted.static void
writeJSONString
(char[] array, Writer out) Deprecated.description omitted.static void
writeJSONString
(double[] array, Writer out) Deprecated.description omitted.static void
writeJSONString
(float[] array, Writer out) Deprecated.description omitted.static void
writeJSONString
(int[] array, Writer out) Deprecated.description omitted.static void
writeJSONString
(long[] array, Writer out) Deprecated.description omitted.static void
writeJSONString
(short[] array, Writer out) Deprecated.description omitted.void
writeJSONString
(Writer out) Deprecated.write JSON string to out.static void
writeJSONString
(Object[] array, Writer out) Deprecated.description omitted.static void
writeJSONString
(Collection collection, Writer out) Deprecated.Encode a list into JSON text and write it to out.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll
-
Constructor Details
-
JSONArray
public JSONArray()Deprecated.Constructs an empty 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:JSONStreamAware
write JSON string to out.- Specified by:
writeJSONString
in 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:
toJSONString
in interfaceJSONAware
- Returns:
- JSON text
-
toString
Deprecated.Returns a string representation of this array. This is equivalent to callingtoJSONString()
.- Overrides:
toString
in classAbstractCollection
-
JsonArray