code: public JSONObject append(String name, Object value) throws JSONException {
          Object current = nameValuePairs.get(checkName(name));
  
          final JSONArray array;
          if (current instanceof JSONArray) {
              array = (JSONArray) current;
          } else if (current == null) {
              JSONArray newArray = new JSONArray();
              nameValuePairs.put(name, newArray);
              array = newArray;
          } else {
              throw new JSONException("Key " + name + " is not a JSONArray");
          }
  
          array.checkedPut(value);
  
          return this;
      }
docs: Appends values to the array mapped to {@code name}. A new {@link JSONArray}
  mapping for {@code name} will be inserted if no mapping exists. If the existing
  mapping for {@code name} is not a {@link JSONArray}, a {@link JSONException}
  will be thrown.
  
  @throws JSONException if {@code name} is {@code null} or if the mapping for
  {@code name} is non-null and is not a {@link JSONArray}.
  
  @hide