mirror of
https://github.com/alibaba/fastjson.git
synced 2026-10-26 11:33:39 +08:00
bug fixed for jsonpath
This commit is contained in:
@@ -318,6 +318,14 @@ public class JSONPath implements ObjectSerializer {
|
||||
}
|
||||
|
||||
Segement readSegement() {
|
||||
if (level == 0 && path.length() == 1) {
|
||||
if (isDigitFirst(ch)) {
|
||||
int index = ch - '0';
|
||||
return new ArrayAccessSegement(index);
|
||||
} else if ((ch >= 'a' && ch <= 'z') || ((ch >= 'A' && ch <= 'Z'))) {
|
||||
return new PropertySegement(Character.toString(ch));
|
||||
}
|
||||
}
|
||||
while (!isEOF()) {
|
||||
skipWhitespace();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user