org.jooq.tools.json
Class JSONArray

java.lang.Object
  extended by org.jooq.tools.json.JSONArray

public class JSONArray
extends Object

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

Author:
FangYidong

Constructor Summary
JSONArray()
           
 
Method Summary
static String toJSONString(List<?> list)
          Convert a list to JSON text.
static void writeJSONString(List<?> list, Writer out)
          Encode a list into JSON text and write it to out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONArray

public JSONArray()
Method Detail

writeJSONString

public static void writeJSONString(List<?> list,
                                   Writer 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.

Parameters:
list -
out -
Throws:
IOException
See Also:
JSONValue.writeJSONString(Object, Writer)

toJSONString

public static String toJSONString(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.

Parameters:
list -
Returns:
JSON text, or "null" if list is null.
See Also:
JSONValue.toJSONString(Object)


Copyright © 2012. All Rights Reserved.