When used in the last segment of a path expression, an index selector using the dot notation is parsed correctly:
Parser.run JsonPath.Parser.path "$.*.foo.0" ==
Ok [ Children Wildcard, Children (Keys "foo" []), Children (Indices 0 [])]
Parser.run JsonPath.Parser.path "$.*.foo..1,2,3" ==
Ok [ Children Wildcard, Children (Keys "foo" []), Descendants (Indices 1 [ 2, 3 ])]
When used in any other position in the path expression however, it results in a parsing error:
Parser.run JsonPath.Parser.path "$.*.0.foo" ==
Err [{ col = 5, problem = ExpectingInt, row = 1 }]
Parser.run JsonPath.Parser.path "$.*..1,2,3.foo" ==
Err [{ col = 10, problem = ExpectingInt, row = 1 }]
When used in the last segment of a path expression, an index selector using the dot notation is parsed correctly:
When used in any other position in the path expression however, it results in a parsing error: