public static String toJSONString(Collection collection){
  final StringWriter writer=new StringWriter();
  try {
    writeJSONString(collection,writer);
    return writer.toString();
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

public static String toJSONString ( Collection collection ) { final StringWriter writer = new StringWriter ( ) ; try { writeJSONString ( collection , writer ) ; return writer . toString ( ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }
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 .
