Process the closing square bracket of a JSON array. @throws UncheckedIOException if an I/O exception is encountered
()
| 344 | * @throws UncheckedIOException if an I/O exception is encountered |
| 345 | */ |
| 346 | public void endArray() { |
| 347 | expect(JsonType.END_COLLECTION); |
| 348 | Container expectation = stack.removeFirst(); |
| 349 | if (expectation != Container.COLLECTION) { |
| 350 | // The only other thing we could be closing is a map |
| 351 | throw new JsonException( |
| 352 | "Attempt to close a JSON List, but a JSON Object was expected. " + input); |
| 353 | } |
| 354 | input.read(); |
| 355 | } |
| 356 | |
| 357 | /** |
| 358 | * Process the opening curly brace of a JSON object. |