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

public static String toJSONString ( Object value ) { final StringWriter writer = new StringWriter ( ) ; try { writeJSONString ( value , writer ) ; return writer . toString ( ) ; } catch ( IOException e ) { throw new RuntimeException ( e ) ; } }
convert an object to json text . < p > if this object is a map or a list , and it ' s also a jsonaware , jsonaware will be considered firstly . < p > do not call this method from tojsonstring ( ) of a class that implements both jsonaware and map or list with " this " as the parameter , use jsonobject . tojsonstring ( map ) or jsonarray . tojsonstring ( list ) instead .
