/** * Produce a JSONArray of JSONObjects from a comma delimited text string, * using the first row as a source of names.<p> * * @param x The JSONTokener containing the comma delimited text * @return A JSONArray of JSONObjects * @throws JSONException if something goes wrong */ public static JSONArray toJSONArray(JSONTokener x) throws JSONException { return toJSONArray(rowToJSONArray(x), x); }
/** * Produce a JSONArray of JSONObjects from a comma delimited text string, * using the first row as a source of names.<p> * * @param string The comma delimited text * @return A JSONArray of JSONObjects * @throws JSONException if something goes wrong */ public static JSONArray toJSONArray(String string) throws JSONException { return toJSONArray(new JSONTokener(string)); }
/** * Produce a JSONArray of JSONObjects from a comma delimited text string * using a supplied JSONArray as the source of element names.<p> * * @param names A JSONArray of strings. * @param string The comma delimited text * @return A JSONArray of JSONObjects * @throws JSONException if something goes wrong */ public static JSONArray toJSONArray(JSONArray names, String string) throws JSONException { return toJSONArray(names, new JSONTokener(string)); }
/** * Produce a JSONArray of JSONObjects from a comma delimited text string * using a supplied JSONArray as the source of element names.<p> * * @param names A JSONArray of strings. * @param string The comma delimited text * @return A JSONArray of JSONObjects * @throws JSONException if something goes wrong */ public static JSONArray toJSONArray(JSONArray names, String string) throws JSONException { return toJSONArray(names, new JSONTokener(string)); }
/** * Produce a JSONArray of JSONObjects from a comma delimited text string, * using the first row as a source of names.<p> * * @param x The JSONTokener containing the comma delimited text * @return A JSONArray of JSONObjects * @throws JSONException if something goes wrong */ public static JSONArray toJSONArray(JSONTokener x) throws JSONException { return toJSONArray(rowToJSONArray(x), x); }
/** * Produce a JSONArray of JSONObjects from a comma delimited text string, * using the first row as a source of names.<p> * * @param string The comma delimited text * @return A JSONArray of JSONObjects * @throws JSONException if something goes wrong */ public static JSONArray toJSONArray(String string) throws JSONException { return toJSONArray(new JSONTokener(string)); }