String readName() { skipWhitespace(); if (ch != '\\' && !Character.isJavaIdentifierStart(ch)) { throw new JSONPathException("illeal jsonpath syntax. " + path); } StringBuilder buf = new StringBuilder(); while (!isEOF()) { if (ch == '\\') { next(); buf.append(ch); if (isEOF()) { return buf.toString(); } next(); continue; } boolean identifierFlag = Character.isJavaIdentifierPart(ch); if (!identifierFlag) { break; } buf.append(ch); next(); } if (isEOF() && Character.isJavaIdentifierPart(ch)) { buf.append(ch); } return buf.toString(); }
String readName() { skipWhitespace(); if (ch != '\\' && !Character.isJavaIdentifierStart(ch)) { throw new JSONPathException("illeal jsonpath syntax. " + path); } StringBuilder buf = new StringBuilder(); while (!isEOF()) { if (ch == '\\') { next(); buf.append(ch); if (isEOF()) { return buf.toString(); } next(); continue; } boolean identifierFlag = Character.isJavaIdentifierPart(ch); if (!identifierFlag) { break; } buf.append(ch); next(); } if (isEOF() && Character.isJavaIdentifierPart(ch)) { buf.append(ch); } return buf.toString(); }
skipWhitespace(); skipWhitespace(); skipWhitespace(); if (ch != ',') { break;
skipWhitespace(); skipWhitespace(); skipWhitespace(); if (ch != ',') { break;
protected Object readValue() { skipWhitespace(); if (isDigitFirst(ch)) { return readLongValue(); } if (ch == '"' || ch == '\'') { return readString(); } if (ch == 'n') { String name = readName(); if ("null".equals(name)) { return null; } else { throw new JSONPathException(path); } } throw new UnsupportedOperationException(); }
protected Object readValue() { skipWhitespace(); if (isDigitFirst(ch)) { return readLongValue(); } if (ch == '"' || ch == '\'') { return readString(); } if (ch == 'n') { String name = readName(); if ("null".equals(name)) { return null; } else { throw new JSONPathException(path); } } throw new UnsupportedOperationException(); }