Consumes the next token from the JSON stream and asserts that it is the end of the current object.
()
| 348 | * object. |
| 349 | */ |
| 350 | public void endElement() throws IOException { |
| 351 | int p = peeked; |
| 352 | if (p == PEEKED_NONE) { |
| 353 | p = doPeek(); |
| 354 | } |
| 355 | if (p == PEEKED_ELEMENT_END) { |
| 356 | popStack(); |
| 357 | peeked = PEEKED_NONE; |
| 358 | } else { |
| 359 | throw syntaxError("Expected end of element but was " + peek()); |
| 360 | } |
| 361 | } |
| 362 | |
| 363 | /** |
| 364 | * Checks if there is one more unconsumed xml element that can be consumed afterwards with {@link |