Array slice with step empty
Setup
Selector: $[1:3:]
["first", "second", "third", "forth", "fifth"]
Results
Consensus
[
"second",
"third"
]
Other responses
C (json-glib)
Not supported
Unable to compile selector `$[1:3:]': Invalid slice definition “ 1:3:]”
Clojure (json-path)
¹
"second"
Elixir (jaxon)
[]
Erlang (ejsonpath)
Not supported
syntax error before: ']'
Java (com.github.jsurfer)
Not supported
org.antlr.v4.runtime.misc.ParseCancellationException
Python (jsonpath-ng)
Not supported
JsonPathParserError('Parse error at 1:5 near token : (:)')
Python (jsonpath-rw)
Not supported
Exception('Parse error at 1:5 near token : (:)')
Raku (JSON-Path)
Not supported
JSON path parse error at position 1
Rust (jsonpath)
Not supported
parsing error
Errors
only support one range(from, to): [1 3 ]
Footnotes
- ¹ This implementation returns a single value where only one match is possible (instead of an array of a single value).
- ² This implementation returns a specific not found value if no match exists.
- ³ This implementation returns a specific not found value if a query that would regularly return a single match results in no match.