Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
bug fixed for jsonpath, for issue #2306
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Apr 11, 2019
1 parent 9ffb27f commit 0e52359
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/alibaba/fastjson/JSONPath.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ public Object extract(DefaultJSONParser parser) {
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;
Expand All @@ -122,6 +123,8 @@ public Object extract(DefaultJSONParser parser) {
eval = true;
} else if (nextSegment instanceof FilterSegment) {
eval = true;
} else if (segment instanceof WildCardSegment) {
eval = true;
} else {
eval = false;
}
Expand Down

0 comments on commit 0e52359

Please sign in to comment.