docs: protected static String valueToString(Object value) throws JSONException {
  		if (value == null || value instanceof JSONNull) {
  			return "null";
  		}
  		if (value instanceof JSONString) {
  			try {
  				return ((JSONString) value).toJSONString();
  			} catch (Exception e) {
  				throw new JSONException(e);
  			}
  		} else if (value instanceof Number) {
  			return NumberUtil.toStr((Number) value);
  		} else if (value instanceof Boolean || value instanceof JSONObject || value instanceof JSONArray) {
  			return value.toString();
  		} else if (value instanceof Map) {
  			Map<?, ?> map = (Map<?, ?>) value;
  			return new JSONObject(map).toString();
  		} else if (value instanceof Collection) {
  			Collection<?> coll = (Collection<?>) value;
  			return new JSONArray(coll).toString();
  		} else if (value.getClass().isArray()) {
  			return new JSONArray(value).toString();
  		} else {
  			return JSONUtil.quote(value.toString());
  		}
  	}