org.json.simple
类 JSONArray

java.lang.Object
  继承者 java.util.AbstractCollection<E>
      继承者 java.util.AbstractList<E>
          继承者 java.util.ArrayList
              继承者 org.json.simple.JSONArray
所有已实现的接口:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess, JSONAware, JSONStreamAware

public class JSONArray
extends java.util.ArrayList
implements java.util.List, JSONAware, JSONStreamAware

A JSON array. JSONObject supports java.util.List interface.

作者:
FangYidong
另请参见:
序列化表格

字段摘要
 
从类 java.util.AbstractList 继承的字段
modCount
 
构造方法摘要
JSONArray()
           
 
方法摘要
 java.lang.String toJSONString()
           
static java.lang.String toJSONString(java.util.List list)
          Convert a list to JSON text.
 java.lang.String toString()
           
static void writeJSONString(java.util.List list, java.io.Writer out)
          Encode a list into JSON text and write it to out.
 void writeJSONString(java.io.Writer out)
          write JSON string to out.
 
从类 java.util.ArrayList 继承的方法
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
从类 java.util.AbstractList 继承的方法
equals, hashCode, iterator, listIterator, listIterator, subList
 
从类 java.util.AbstractCollection 继承的方法
containsAll, removeAll, retainAll
 
从类 java.lang.Object 继承的方法
finalize, getClass, notify, notifyAll, wait, wait, wait
 
从接口 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()
方法详细信息

writeJSONString

public static void writeJSONString(java.util.List list,
                                   java.io.Writer out)
                            throws java.io.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.

参数:
list -
out -
抛出:
java.io.IOException
另请参见:
JSONValue.writeJSONString(Object, Writer)

writeJSONString

public void writeJSONString(java.io.Writer out)
                     throws java.io.IOException
从接口 JSONStreamAware 复制的描述
write JSON string to out.

指定者:
接口 JSONStreamAware 中的 writeJSONString
抛出:
java.io.IOException

toJSONString

public static java.lang.String toJSONString(java.util.List 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.

参数:
list -
返回:
JSON text, or "null" if list is null.
另请参见:
JSONValue.toJSONString(Object)

toJSONString

public java.lang.String toJSONString()
指定者:
接口 JSONAware 中的 toJSONString
返回:
JSON text

toString

public java.lang.String toString()
覆盖:
java.util.AbstractCollection 中的 toString


Copyright © 2012. All Rights Reserved.