Union with slice and number

Setup

Selector: $[1:3,4]

[1,2,3,4,5]

Results

Other responses

Bash (JSONPath.sh)

[]

C (json-glib)

Not supported

Unable to compile selector `$[1:3,4]': Invalid slice definition “1:3,4]”

Clojure (json-path) ¹

2

Cpp (jsoncons)

[
  2,
  3,
  5
]

Dart (json_path)

[
  2,
  3,
  5
]

Elixir (ExJsonPath)

[
  2,
  3,
  5
]

Elixir (jaxon)

[]

Elixir (warpath) ¹

Not supported

Parser error: Invalid token on line 1, syntax error before: <<",">>

Erlang (ejsonpath)

Not supported

syntax error before: ','

Golang (github.com-PaesslerAG-jsonpath) ¹

Not supported

parsing error: $[1:3,4]	:1:6 - 1:7 mixed 58 and 44 in JSON bracket

Golang (github.com-ohler55-ojg)

Not supported

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

[
  2,
  3,
  5
]

Haskell (jsonpath)

[
  2,
  3,
  5
]

JavaScript (Goessner) ²

[
  2,
  3,
  5
]

JavaScript (brunerd)

[
  2,
  3,
  5
]

JavaScript (jsonpath)

[
  2,
  3,
  5
]

JavaScript (jsonpath-plus)

[
  2,
  3,
  5
]

JavaScript (jsonpathly)

Not supported

mismatched input ',' expecting ']'

Java (com.github.jsurfer)

Not supported

org.antlr.v4.runtime.misc.ParseCancellationException

Java (com.jayway.jsonpath) ¹ ³

Not supported

SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
com.jayway.jsonpath.InvalidPathException: Failed to parse SliceOperation: 1:3,4

Kotlin (com.nfeld.jsonpathkt) ¹

[
  2,
  3
]

Objective-C (SMJJSONPath) ¹ ³

Not supported

Failed to parse SliceOperation: 1:3,4

PHP (Goessner) ²

[
  2,
  3,
  5
]

PHP (galbar-jsonpath)

Not supported

Invalid JSONPath error: 'Error in JSONPath near '1:3,4''

PHP (remorhaz-jsonpath)

Not supported

Error: 'Failed to build AST from JSONPath query: $[1:3,4]'

PHP (softcreatr-jsonpath)

[
  2,
  3
]

Perl (JSON-Path)

[
  2,
  3
]

Python (jsonpath) ²

[
  2,
  3,
  5
]

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 , (,)')

Python (jsonpath2)

[
  2,
  3,
  5
]

Python (python-jsonpath)

[
  2,
  3,
  5
]

Raku (JSON-Path)

Not supported

JSON path parse error at position 1

Ruby (jsonpath)

[
  2,
  3,
  5
]

Rust (jsonpath)

Not supported

parsing error

Rust (jsonpath_lib)

Not supported

path error: 
$[1:3,4]
^^^^^^

Rust (jsonpath_plus)

[
  2,
  3,
  5
]

Rust (serde_json_path)

[
  2,
  3,
  5
]

Scala (jsonpath)

Not supported

JPError(end of input expected)

Swift (Sextant)

Not supported

NOT_SUPPORTED

dotNET (Json.NET)

[
  4,
  5
]

dotNET (JsonCons.JsonPath)

[
  2,
  3,
  5
]

dotNET (JsonPath.Net)

[
  2,
  3,
  5
]

dotNET (JsonPathLib)

[
  2,
  3,
  5
]

dotNET (Manatee.Json)

[
  2,
  3,
  5
]

Errors

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

path: invalid character at 5

Golang (github.com-oliveagle-jsonpath) ¹

strconv.Atoi: parsing "3,4": invalid syntax

Golang (github.com-spyzhov-ajson)

wrong request: wrong request: 1:3,4

Footnotes