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

Method nextValue

src/main/java/com/google/gson/stream/JsonReader.java:785–810  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

783 }
784
785 @SuppressWarnings("fallthrough")
786 private JsonToken nextValue() throws IOException {
787 int c = nextNonWhitespace();
788 switch (c) {
789 case '{':
790 push(JsonScope.EMPTY_OBJECT);
791 hasToken = true;
792 return token = JsonToken.BEGIN_OBJECT;
793
794 case '[':
795 push(JsonScope.EMPTY_ARRAY);
796 hasToken = true;
797 return token = JsonToken.BEGIN_ARRAY;
798
799 case '\'':
800 checkLenient(); // fall-through
801 case '"':
802 value = nextString((char) c);
803 hasToken = true;
804 return token = JsonToken.STRING;
805
806 default:
807 pos--;
808 return readLiteral();
809 }
810 }
811
812 /**
813 * Returns true once {@code limit - pos >= minimum}. If the data is

Callers 3

quickPeekMethod · 0.95
nextInArrayMethod · 0.95
objectValueMethod · 0.95

Calls 5

nextNonWhitespaceMethod · 0.95
pushMethod · 0.95
checkLenientMethod · 0.95
nextStringMethod · 0.95
readLiteralMethod · 0.95

Tested by

no test coverage detected