Array slice with open start and negative step
Setup
Selector: $[:2:-1]
["first", "second", "third", "forth", "fifth"]
Results
Other responses
Bash (JSONPath.sh)
[
"first",
"second"
]
Clojure (json-path)
¹
"third"
Cpp (jsoncons)
[
"fifth",
"forth"
]
Dart (json_path)
[
"fifth",
"forth"
]
Elixir (jaxon)
[]
Elixir (warpath)
¹
[
"fifth",
"forth",
"third"
]
Erlang (ejsonpath)
Not supported
syntax error before: ':'
[
"second",
"first"
]
[
"fifth",
"forth"
]
[]
[
"fifth",
"forth"
]
[
"fifth",
"forth"
]
Haskell (jsonpath)
[
"fifth",
"forth"
]
JavaScript (Goessner)
²
Not found
jsonpath returned false, this might indicate an error
JavaScript (brunerd)
[
"fifth",
"forth"
]
JavaScript (jsonpath)
[
"fifth",
"forth"
]
JavaScript (jsonpath-plus)
[]
JavaScript (jsonpathly)
[
"first",
"second"
]
Java (com.github.jsurfer)
Not supported
org.antlr.v4.runtime.misc.ParseCancellationException
Java (com.jayway.jsonpath)
¹
³
[
"first",
"second"
]
Kotlin (com.nfeld.jsonpathkt)
¹
[
"third",
"forth"
]
Objective-C (SMJJSONPath)
¹
³
[
"first",
"second"
]
PHP (galbar-jsonpath)
[
"fifth",
"forth"
]
PHP (remorhaz-jsonpath)
[
"fifth",
"forth"
]
Perl (JSON-Path)
[
"second",
"first"
]
Python (jsonpath)
²
Not found
jsonpath returned false, this might indicate an error
Python (jsonpath-ng)
Not supported
JsonPathParserError('Parse error at 1:4 near token : (:)')
Python (jsonpath-rw)
Not supported
Exception('Parse error at 1:4 near token : (:)')
Python (jsonpath2)
[]
Python (python-jsonpath)
[
"fifth",
"forth"
]
Raku (JSON-Path)
Not supported
JSON path parse error at position 1
Rust (jsonpath)
Not supported
parsing error
Rust (jsonpath_lib)
Not supported
path error:
$[:2:-1]
^^^^^
Rust (jsonpath_plus)
[
"second",
"first"
]
Rust (serde_json_path)
[
"fifth",
"forth"
]
Scala (jsonpath)
[
"fifth",
"forth"
]
Swift (Sextant)
[
"first",
"second"
]
dotNET (Json.NET)
[
"fifth",
"forth"
]
dotNET (JsonCons.JsonPath)
[
"fifth",
"forth"
]
dotNET (JsonPath.Net)
[
"fifth",
"forth"
]
dotNET (JsonPathLib)
[]
dotNET (Manatee.Json)
[]
Errors
C (json-glib)
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
json_array_get_element: assertion 'index_ < array->elements->len' failed
json_node_copy: assertion 'JSON_NODE_IS_VALID (node)' failed
json_array_add_element: assertion 'node != NULL' failed
Elixir (ExJsonPath)
FunctionClauseError
only support one range(from, to): [ 2 -1]
PHP (Goessner)
²
timeout: sending signal TERM to command ‘implementations/PHP_Goessner/run.sh’
PHP (softcreatr-jsonpath)
timeout: sending signal TERM to command ‘php’
Ruby (jsonpath)
step can't be negative
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.