Browse Source

The conditions the same as the other

pull/262/head
kysnm 8 years ago
parent
commit
0ea1cb59ad
  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

@ -576,7 +576,8 @@ public class PathCompiler {
break;
} else if (c == potentialStringDelimiter) {
if (inProperty && !inEscape) {
if (!path.nextSignificantCharIs(readPosition, COMMA) && !path.nextSignificantCharIs(readPosition, CLOSE_SQUARE_BRACKET)) {
char nextSignificantChar = path.nextSignificantChar(readPosition);
if (nextSignificantChar != CLOSE_SQUARE_BRACKET && nextSignificantChar != COMMA) {
fail("Property must be separated by comma or Property must be terminated close square bracket at index "+readPosition);
}
endPosition = readPosition;

Loading…
Cancel
Save