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

Method isLiteral

gson/src/main/java/com/google/gson/stream/JsonReader.java:894–918  ·  view source on GitHub ↗
(char c)

Source from the content-addressed store, hash-verified

892 }
893
894 @SuppressWarnings("fallthrough")
895 private boolean isLiteral(char c) throws IOException {
896 switch (c) {
897 case '/':
898 case '\\':
899 case ';':
900 case '#':
901 case '=':
902 checkLenient(); // fall-through
903 case '{':
904 case '}':
905 case '[':
906 case ']':
907 case ':':
908 case ',':
909 case ' ':
910 case '\t':
911 case '\f':
912 case '\r':
913 case '\n':
914 return false;
915 default:
916 return true;
917 }
918 }
919
920 /**
921 * Returns the next token, a {@link JsonToken#NAME property name}, and consumes it.

Callers 3

doPeekMethod · 0.95
peekKeywordMethod · 0.95
peekNumberMethod · 0.95

Calls 1

checkLenientMethod · 0.95

Tested by

no test coverage detected