MCPcopy
hub / github.com/google/gson / nextNull

Method nextNull

src/main/java/com/google/gson/stream/JsonReader.java:503–514  ·  view source on GitHub ↗

Consumes the next token from the JSON stream and asserts that it is a literal null. @throws IllegalStateException if the next token is not null or if this reader is closed.

()

Source from the content-addressed store, hash-verified

501 * reader is closed.
502 */
503 public void nextNull() throws IOException {
504 quickPeek();
505 if (value == null || token == JsonToken.STRING) {
506 throw new IllegalStateException("Expected null but was " + peek());
507 }
508
509 if (!value.equalsIgnoreCase("null")) {
510 throw new IllegalStateException("Not a null: " + value);
511 }
512
513 advance();
514 }
515
516 /**
517 * Returns the {@link JsonToken#NUMBER double} value of the next token,

Calls 3

quickPeekMethod · 0.95
peekMethod · 0.95
advanceMethod · 0.95