net.minidev.json
Class JSONArray
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Object>
net.minidev.json.JSONArray
- All Implemented Interfaces:
- Serializable, Cloneable, Iterable<Object>, Collection<Object>, List<Object>, RandomAccess
public class JSONArray
- extends ArrayList<Object>
- implements List<Object>
A JSON array. JSONObject supports java.util.List interface.
- Author:
- FangYidong, Uriel Chemouni
- See Also:
- Serialized Form
| Methods inherited from class java.util.ArrayList |
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from interface java.util.List |
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray |
JSONArray
public JSONArray()
toJSONString
public static String toJSONString(List<Object> list)
- 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.
- Returns:
- JSON text, or "null" if list is null.
- See Also:
JSONValue.toJSONString(Object)
writeJSONString
public static void writeJSONString(List<Object> list,
Appendable out)
throws IOException
- 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.
- Throws:
IOException- See Also:
JSONValue.writeJSONString(Object, Appendable)
merge
public void merge(Object o2)
toJSONString
public String toJSONString()
- Explicitely Serialize Object as JSon String
toString
public String toString()
- Override natif toStirng()
- Overrides:
toString in class AbstractCollection<Object>
writeJSONString
public void writeJSONString(Appendable out)
throws IOException
- Throws:
IOException
Copyright © 2011 Chemouni Uriel. All Rights Reserved.