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

Method assertFullConsumption

src/main/java/com/google/gson/Gson.java:472–482  ·  view source on GitHub ↗
(Object obj, JsonReader reader)

Source from the content-addressed store, hash-verified

470 }
471
472 private static void assertFullConsumption(Object obj, JsonReader reader) {
473 try {
474 if (obj != null && reader.peek() != JsonToken.END_DOCUMENT) {
475 throw new JsonIOException("JSON document was not fully consumed.");
476 }
477 } catch (MalformedJsonException e) {
478 throw new JsonSyntaxException(e);
479 } catch (IOException e) {
480 throw new JsonIOException(e);
481 }
482 }
483
484 /**
485 * Reads the next JSON value from {@code reader} and convert it to an object

Callers 1

fromJsonMethod · 0.95

Calls 1

peekMethod · 0.45

Tested by

no test coverage detected