MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / endArray

Method endArray

java/src/org/openqa/selenium/json/JsonInput.java:403–413  ·  view source on GitHub ↗

Process the closing square bracket of a JSON array. @throws UncheckedIOException if an I/O exception is encountered

()

Source from the content-addressed store, hash-verified

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.

Calls 2

expectMethod · 0.95
readMethod · 0.65