| 357 | } |
| 358 | |
| 359 | @Override |
| 360 | public void print(Writer w, int indent, boolean compact) throws IOException { |
| 361 | String ind1 = AbstractJSONObject.indent(indent); |
| 362 | String ind2 = AbstractJSONObject.indent(indent + 1); |
| 363 | w.append('['); |
| 364 | |
| 365 | boolean first = true; |
| 366 | for (JObject obj : this) { |
| 367 | if (first) { |
| 368 | first = false; |
| 369 | } else { |
| 370 | w.append(','); |
| 371 | } |
| 372 | if (!compact) { |
| 373 | w.append(System.lineSeparator()); |
| 374 | w.append(ind2); |
| 375 | } |
| 376 | obj.print(w, indent + 1, compact); |
| 377 | } |
| 378 | if (!compact) { |
| 379 | w.append(System.lineSeparator()); |
| 380 | w.append(ind1); |
| 381 | } |
| 382 | w.append(']'); |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | /** |