/** * @nowebref */ public JSONArray(Reader reader) { this(new JSONTokener(reader)); }
/** * @nowebref */ public JSONObject(Reader reader) { this(new JSONTokener(reader)); }
/** * @nowebref */ public JSONArray(Reader reader) { this(new JSONTokener(reader)); }
/** * @nowebref */ public JSONObject(Reader reader) { this(new JSONTokener(reader)); }
/** * Construct a JSONObject from a source JSON text string. * This is the most commonly used JSONObject constructor. * @param source A string beginning * with <code>{</code> <small>(left brace)</small> and ending * with <code>}</code> <small>(right brace)</small>. * @exception RuntimeException If there is a syntax error in the source * string or a duplicated key. */ static public JSONObject parse(String source) { return new JSONObject(new JSONTokener(source)); }
/** * Construct a JSONObject from a source JSON text string. * This is the most commonly used JSONObject constructor. * @param source A string beginning * with <code>{</code> <small>(left brace)</small> and ending * with <code>}</code> <small>(right brace)</small>. * @exception JSONException If there is a syntax error in the source * string or a duplicated key. */ static public JSONObject parse(String source) { return new JSONObject(new JSONTokener(source)); }
/** * Construct a JSONArray from a source JSON text. * @param source A string that begins with * <code>[</code> <small>(left bracket)</small> * and ends with <code>]</code> <small>(right bracket)</small>. * @throws JSONException If there is a syntax error. */ static public JSONArray parse(String source) { try { return new JSONArray(new JSONTokener(source)); } catch (Exception e) { return null; } }
/** * Construct a JSONArray from a source JSON text. * @param source A string that begins with * <code>[</code> <small>(left bracket)</small> * and ends with <code>]</code> <small>(right bracket)</small>. * @return {@code null} if there is a syntax error. */ static public JSONArray parse(String source) { try { return new JSONArray(new JSONTokener(source)); } catch (Exception e) { return null; } }