We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d0a363 commit 2cb9b47Copy full SHA for 2cb9b47
json-path/src/test/java/com/jayway/jsonpath/PathCompilerTest.java
@@ -251,4 +251,19 @@ public void issue_predicate_can_have_square_bracket_in_prop() {
251
252
assertThat(result).containsExactly("] it");
253
}
254
+
255
+ @Test(expected = InvalidPathException.class)
256
+ public void array_indexes_must_be_separated_by_commas() {
257
+ compile("$[0, 1, 2 4]");
258
+ }
259
260
261
+ public void trailing_comma_after_list_is_not_accepted() {
262
+ compile("$['1','2',]");
263
264
265
266
+ public void accept_only_a_single_comma_between_indexes() {
267
+ compile("$['1', ,'3']");
268
269
0 commit comments