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

Method endObject

java/src/org/openqa/selenium/json/JsonOutput.java:335–351  ·  view source on GitHub ↗

End the current JSON object. @return this JsonOutput object @throws JsonException if top item on serialization object stack isn't a JsonObject @throws java.util.NoSuchElementException if serialization object stack is empty

()

Source from the content-addressed store, hash-verified

333 * @throws java.util.NoSuchElementException if serialization object stack is empty
334 */
335 public JsonOutput endObject() {
336 Node topOfStack = stack.getFirst();
337 if (!(topOfStack instanceof JsonObject)) {
338 throw new JsonException("Attempt to close a json object, but not writing a json object");
339 }
340 stack.removeFirst();
341 indent = indent.substring(0, indent.length() - indentBy.length());
342
343 if (!topOfStack.isEmpty) {
344 rawAppend(lineSeparator);
345 rawAppend(indent);
346 } else {
347 rawAppend(indent);
348 }
349 rawAppend("}");
350 return this;
351 }
352
353 /**
354 * Begin a new JSON array.

Callers 2

mapObjectMethod · 0.95
resolveConverterMethod · 0.45

Calls 2

rawAppendMethod · 0.95
lengthMethod · 0.65

Tested by

no test coverage detected