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) ¹

Not supported

Parser error: Invalid token on line 1, slice step should be greater than zero.

Erlang (ejsonpath)

Not supported

syntax error before: ':'

Golang (github.com-PaesslerAG-jsonpath) ¹

[
  "second",
  "first"
]

Golang (github.com-bhmj-jsonslice) ¹ ³

[
  "fifth",
  "forth"
]

Golang (github.com-ohler55-ojg)

[]

Golang (github.com-spyzhov-ajson)

[
  "fifth",
  "forth"
]

Golang (github.com-vmware-labs-yaml-jsonpath)

[
  "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)

[]

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)

[]

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"
]

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)

[]

JSON (Path_Reference_Implementation)

[
  "fifth",
  "forth"
]

Proposal (A)

[
  "fifth",
  "forth"
]

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

Golang (github.com-oliveagle-jsonpath) ¹

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