/** * 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. */ public JSONObject(final String source) throws JSONException { this(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. */ public JSONArray(final String source) throws JSONException { this(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. */ public JSONArray(final String source) throws JSONException { this(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. */ public JSONObject(final String source) throws JSONException { this(new JSONTokener(source)); }