Filter expression without parens

Setup

Selector: $[?@.key==42]

[
    {"key": 0},
    {"key": 42},
    {"key": -1},
    {"key": 1},
    {"key": 41},
    {"key": 43},
    {"key": 42.0001},
    {"key": 41.9999},
    {"key": 100},
    {"key": "some"},
    {"key": "42"},
    {"key": null},
    {"key": 420},
    {"key": ""},
    {"key": {}},
    {"key": []},
    {"key": [42]},
    {"key": {"key": 42}},
    {"key": {"some": 42}},
    {"some": "value"}
]

Results

Consensus

Not supported

Other responses

Bash (JSONPath.sh)

[]

Cpp (jsoncons)

[
  {
    "key": 42
  }
]

Elixir (jaxon)

[]

Golang (github.com-PaesslerAG-jsonpath) ¹

[
  {
    "key": 42
  }
]

Golang (github.com-spyzhov-ajson)

[]

Haskell (jsonpath)

[
  {
    "key": 42
  }
]

JavaScript (Goessner) ²

Not found

jsonpath returned false, this might indicate an error

JavaScript (jsonpath-plus)

[]

PHP (Goessner) ²

Not found

jsonpath returned false, this might indicate an error

Perl (JSON-Path)

[]

Python (jsonpath) ²

Not found

jsonpath returned false, this might indicate an error

dotNET (JsonCons.JsonPath)

[
  {
    "key": 42
  }
]

dotNET (JsonPath.Net)

[
  {
    "key": 42
  }
]

dotNET (JsonPathLib)

[]

Errors

Clojure (json-path) ¹

java.lang.NumberFormatException For input string: "@"

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

path: invalid character at 4

Golang (github.com-oliveagle-jsonpath) ¹

interface conversion: interface {} is nil, not string

Ruby (jsonpath)

invalid value for Integer(): "@.key==42"

Rust (jsonpath_plus)

Error Parsing JSON Path:
$[?@.key==42]
panic occurred

Footnotes