/** * This method is the same as {@link JSONObject#stringToValue(String)} * except that this also tries to unescape String values. * * @param string String to convert * @return JSON value of this string or the string */ public static Object stringToValue(String string) { return JSONObject.stringToValue(string); }
throw this.syntaxError("Missing value"); return JSONObject.stringToValue(string);
throw this.syntaxError("Missing value"); return JSONObject.stringToValue(string);
throw this.syntaxError("Missing value"); return JSONObject.stringToValue(string);
/** * This method has been deprecated in favor of the * {@link JSONObject.stringToValue(String)} method. Use it instead. * * @deprecated Use JSONObject#stringToValue(String) instead. * @param string String to convert * @return JSON value of this string or the string */ @Deprecated public static Object stringToValue(String string) { return JSONObject.stringToValue(string); }
@SuppressWarnings("unchecked") private Object stringToValue(String str) throws JSONException { if (str.startsWith("[")) { // array JSONArray a = new JSONArray(str); List al = new ArrayList(); for (int i=0 ; i<a.length() ; i++) { Object elem = a.get(i); if (elem!=null) { al.add(stringToValue(elem.toString())); } } return al; } return JSONObject.stringToValue(str); }
throw syntaxError("Missing value"); return JSONObject.stringToValue(s);
throw syntaxError("Missing value"); return JSONObject.stringToValue(string);
throw this.syntaxError("Missing value"); return JSONObject.stringToValue(string);
throw this.syntaxError("Missing value"); return JSONObject.stringToValue(string);
throw syntaxError("Missing value"); return JSONObject.stringToValue(string);
throw syntaxError("Missing value"); return JSONObject.stringToValue(s);
throw syntaxError("Missing value"); return JSONObject.stringToValue(s);
throw this.syntaxError("Missing value"); return JSONObject.stringToValue(string);
throw this.syntaxError("Missing value"); return JSONObject.stringToValue(string);
throw syntaxError("Missing value"); return JSONObject.stringToValue(s);
throw syntaxError("Missing value"); return JSONObject.stringToValue(s);
throw syntaxError("Missing value"); return JSONObject.stringToValue(s);
throw syntaxError("Missing value"); return JSONObject.stringToValue(string);
value = JSONObject.stringToValue(new String(bytes, 0, length, "US-ASCII")); } catch (UnsupportedEncodingException e) {