static String valueToString(Object value) throws JSONException {
  if (value == null) {
    return "null";
  }
  if (value instanceof Number) {
    return numberToString((Number)value);
  }
  if (value instanceof Boolean || value instanceof JSONObject || value instanceof JSONArray) {
    return value.toString();
  }
  return quote(value.toString());
}

static String valueToString ( Object value ) throws JSONException { if ( value == null ) { return "null" ; } if ( value instanceof Number ) { return numberToString ( ( Number ) value ) ; } if ( value instanceof Boolean || value instanceof JSONObject || value instanceof JSONArray ) { return value . toString ( ) ; } return quote ( value . toString ( ) ) ; }
make a json text of an object value . < p > warning : this method assumes that the data structure is acyclical .
