Browse Source

fix detection of trailing comma

pull/194/head
Jochen Berger 9 years ago
parent
commit
7115c6155f
  1. 3
      json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java

3
json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java

@ -570,6 +570,9 @@ public class PathCompiler {
} else if('\\' == c){
inEscape = true;
} else if (c == CLOSE_SQUARE_BRACKET && !inProperty) {
if (lastSignificantWasComma){
fail("Found empty property at index "+readPosition);
}
break;
} else if (c == potentialStringDelimiter) {
if (inProperty && !inEscape) {

Loading…
Cancel
Save