Serializable
, Cloneable
, Iterable<Object>
, Collection<Object>
, List<Object>
, RandomAccess
, JSONAware
, JSONAwareEx
, JSONStreamAware
, JSONStreamAwareEx
public class JSONArray extends ArrayList<Object> implements List<Object>, JSONAwareEx, JSONStreamAwareEx
modCount
Constructor | Description |
---|---|
JSONArray() |
Modifier and Type | Method | Description |
---|---|---|
void |
merge(Object o2) |
|
String |
toJSONString() |
Explicitely Serialize Object as JSon String
|
static String |
toJSONString(List<? extends Object> list) |
|
static String |
toJSONString(List<? extends Object> list,
JSONStyle compression) |
Convert a list to JSON text.
|
String |
toJSONString(JSONStyle compression) |
|
String |
toString() |
Override natif toStirng()
|
String |
toString(JSONStyle compression) |
JSONAwareEx inferface
|
void |
writeJSONString(Appendable out) |
write JSON string to out.
|
void |
writeJSONString(Appendable out,
JSONStyle compression) |
write JSON string to out.
|
static void |
writeJSONString(Iterable<? extends Object> list,
Appendable out,
JSONStyle compression) |
Encode a list into JSON text and write it to out.
|
static void |
writeJSONString(List<? extends Object> list,
Appendable out) |
containsAll
equals, hashCode
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
parallelStream, removeIf, stream
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
public static String toJSONString(List<? extends Object> list, JSONStyle compression)
list
- compression
- Indicate compression levelJSONValue.toJSONString(Object)
public static void writeJSONString(Iterable<? extends Object> list, Appendable out, JSONStyle compression) throws IOException
list
- out
- IOException
JSONValue.writeJSONString(Object, Appendable)
public static void writeJSONString(List<? extends Object> list, Appendable out) throws IOException
IOException
public void merge(Object o2)
public String toJSONString()
toJSONString
in interface JSONAware
public String toJSONString(JSONStyle compression)
toJSONString
in interface JSONAwareEx
public String toString()
toString
in class AbstractCollection<Object>
public String toString(JSONStyle compression)
compression
- compression parampublic void writeJSONString(Appendable out) throws IOException
JSONStreamAware
writeJSONString
in interface JSONStreamAware
IOException
public void writeJSONString(Appendable out, JSONStyle compression) throws IOException
JSONStreamAwareEx
writeJSONString
in interface JSONStreamAwareEx
IOException