JSONArray array = new JSONArray(); return array;
return new JSONBoolean(value);
return new JSONNumber(value);
return new JSONString(value);
return new JSONObject();
Given a jsonString return the JSONObject representation. This method will throw a JSONException if the string is invalid.paramjsonStringreturna JSONObject that has been built by parsing the JSON string. // Create a JavaScriptObject from the JSON string // try { JavaScriptObject jsonObject = evaluate(jsonString); return buildObject(jsonObject); } catch (JavaScriptException ex) { throw new JSONException(ex); }
// Create a JavaScriptObject from the JSON string // try { JavaScriptObject jsonObject = evaluate(jsonString); return buildObject(jsonObject); } catch (JavaScriptException ex) { throw new JSONException(ex); }
throw new JSONException();
return value.toString();