Home | History | Annotate | Download | only in json

Lines Matching full:jsonarray

45  * <code>Boolean</code>, <code>JSONArray</code>, <code>JSONObject</code>,
347 map.put(key, new JSONArray(result, includeSuperClass));
349 map.put(key, new JSONArray((Collection)result, includeSuperClass));
427 * JSONArray is stored under the key to hold all of the accumulated values.
428 * If there is already a JSONArray, then the new value is appended to it.
441 put(key, value instanceof JSONArray ?
442 new JSONArray().put(value) :
444 } else if (o instanceof JSONArray) {
445 ((JSONArray)o).put(value);
447 put(key, new JSONArray().put(o).put(value));
456 * JSONArray containing the value parameter. If the key was already
457 * associated with a JSONArray, then the value parameter is appended to it.
462 * associated with the key is not a JSONArray.
469 put(key, new JSONArray().put(value));
470 } else if (o instanceof JSONArray) {
471 put(key, ((JSONArray)o).put(value));
474 "] is not a JSONArray.");
584 * Get the JSONArray value associated with a key.
587 * @return A JSONArray which is the value.
589 * if the value is not a JSONArray.
591 public JSONArray getJSONArray(String key) throws JSONException {
593 if (o instanceof JSONArray) {
594 return (JSONArray)o;
597 "] is not a JSONArray.");
734 * Produce a JSONArray containing the names of the elements of this
736 * @return A JSONArray containing the key strings, or null if the JSONObject
739 public JSONArray names() {
740 JSONArray ja = new JSONArray();
819 * JSONArray which is produced from a Collection.
826 put(key, new JSONArray(value));
900 * Get an optional JSONArray associated with a key.
902 * JSONArray.
905 * @return A JSONArray which is the value.
907 public JSONArray optJSONArray(String key) {
909 return o instanceof JSONArray ? (JSONArray)o : null;
1062 * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String,
1107 * types: Boolean, Double, Integer, JSONArray, JSONObject, Long, String,
1294 * Produce a JSONArray containing the values of the members of this
1296 * @param names A JSONArray containing a list of key strings. This
1298 * @return A JSONArray of values.
1301 public JSONArray toJSONArray(JSONArray names) throws JSONException {
1305 JSONArray ja = new JSONArray();
1427 * then a JSONArray will be made from it and its toJSONString method
1461 value instanceof JSONArray) {
1468 return new JSONArray((Collection)value).toString();
1471 return new JSONArray(value).toString();
1515 if (value instanceof JSONArray) {
1516 return ((JSONArray)value).toString(indentFactor, indent);
1522 return new JSONArray((Collection)value).toString(indentFactor, indent);
1525 return new JSONArray(value).toString(indentFactor, indent);
1556 } else if (v instanceof JSONArray) {
1557 ((JSONArray)v).write(writer);