Process the closing square bracket of a JSON array. @throws UncheckedIOException if an I/O exception is encountered
()
| 401 | * @throws UncheckedIOException if an I/O exception is encountered |
| 402 | */ |
| 403 | public void endArray() { |
| 404 | expect(JsonType.END_COLLECTION); |
| 405 | if (stack.peekFirst() != Container.COLLECTION) { |
| 406 | // The only other thing we could be closing is a map |
| 407 | throw new JsonException( |
| 408 | "Attempt to close a JSON List, but a JSON Object was expected. " + input); |
| 409 | } |
| 410 | stack.removeFirst(); |
| 411 | containerHasElement.removeFirst(); |
| 412 | input.read(); |
| 413 | } |
| 414 | |
| 415 | /** |
| 416 | * Process the opening curly brace of a JSON object. |