mirror of
https://github.com/alibaba/fastjson.git
synced 2026-10-29 14:10:25 +08:00
bug fixed for jsonpath, for issue #2306
This commit is contained in:
@@ -100,7 +100,8 @@ public class JSONPath implements JSONAware {
|
||||
boolean last = i == segments.length - 1;
|
||||
|
||||
if (context != null && context.object != null) {
|
||||
return segment.eval(this, null, context.object);
|
||||
context.object = segment.eval(this, null, context.object);
|
||||
continue;
|
||||
}
|
||||
|
||||
boolean eval;
|
||||
@@ -122,6 +123,8 @@ public class JSONPath implements JSONAware {
|
||||
eval = true;
|
||||
} else if (nextSegment instanceof FilterSegment) {
|
||||
eval = true;
|
||||
} else if (segment instanceof WildCardSegment) {
|
||||
eval = true;
|
||||
} else {
|
||||
eval = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user