Begin appending a new array. All values until the balancing endArray will be appended to this array. The endArray method must be called to mark the array's end. @return this @throws JSONException If the nesting is too deep, or if the object is started in
()
| 131 | * outermost array or object). |
| 132 | */ |
| 133 | public JSONWriter array() throws JSONException { |
| 134 | if (this.mode == 'i' || this.mode == 'o' || this.mode == 'a') { |
| 135 | this.push(null); |
| 136 | this.append("["); |
| 137 | this.comma = false; |
| 138 | return this; |
| 139 | } |
| 140 | throw new JSONException("Misplaced array."); |
| 141 | } |
| 142 | |
| 143 | /** |
| 144 | * End something. |