Filter expression with equals boolean expression value
Setup
Selector: $[?((@.key<44)==false)]
[{"key": 42}, {"key": 43}, {"key": 44}]
Results
Other responses
Bash (JSONPath.sh)
[]
C (json-glib)
Not supported
Unable to compile selector `$[?((@.key<44)==false)]': Invalid array index definition “?((@.key<44)==false)]”
Clojure (json-path)
¹
[]
Cpp (jsoncons)
[
{
"key": 44
}
]
Dart (json_path)
Not supported
end of input expected at 1:2
Elixir (ExJsonPath)
Not supported
syntax error before: '('
Elixir (jaxon)
[]
Elixir (warpath)
¹
Not supported
Parser error: Invalid token on line 1, syntax error before: '=='
Erlang (ejsonpath)
Not supported
syntax error before: '('
Not supported
parsing error: $[?((@.key<44)==false)] :1:11 - 1:12 unexpected "<" while scanning parentheses expected ")"
[
{
"key": 44
}
]
[
{
"key": 44
}
]
[]
[
{
"key": 44
}
]
[
{
"key": 42
},
{
"key": 43
}
]
Haskell (jsonpath)
Not supported
Invalid JSONPath: $[?((@.key<44)==false)]
Error: 1:15:
|
1 | $[?((@.key<44)==false)]
| ^^
unexpected "=="
expecting "&&", "||", ')', or white space
JavaScript (Goessner)
²
[
{
"key": 44
}
]
JavaScript (brunerd)
[
{
"key": 44
}
]
JavaScript (jsonpath)
[
{
"key": 44
}
]
JavaScript (jsonpath-plus)
[
{
"key": 44
}
]
Java (com.github.jsurfer)
Not supported
line 1:4 no viable alternative at input '('
org.antlr.v4.runtime.misc.ParseCancellationException
Java (com.jayway.jsonpath)
¹
³
Not supported
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
com.jayway.jsonpath.InvalidPathException: Expected character: )
Kotlin (com.nfeld.jsonpathkt)
¹
Not supported
Unexpected char, char=?, index=2
Objective-C (SMJJSONPath)
¹
³
Not supported
Expected character ')' but found '='
PHP (galbar-jsonpath)
[
{
"key": 42
},
{
"key": 43
},
{
"key": 44
}
]
PHP (remorhaz-jsonpath)
[
{
"key": 44
}
]
Python (jsonpath)
²
Not found
jsonpath returned false, this might indicate an error
Python (jsonpath-ng)
Not supported
JsonPathLexerError('Error on line 1, col 2: Unexpected character: ? ')
Python (jsonpath-rw)
Not supported
JsonPathLexerError('Error on line 1, col 2: Unexpected character: ? ')
Python (jsonpath2)
Not supported
line 1:14 mismatched input '=' expecting ')'
ValueError("line 1:14 mismatched input '=' expecting ')'")
Raku (JSON-Path)
Not supported
Evaluation of embedded Perl 6 code not allowed (construct with :allow-eval)
Rust (jsonpath)
Not supported
parsing error
Rust (jsonpath_lib)
Not supported
path error:
$[?((@.key<44)==false)]
^^^^^^^^^^^^^^^^
Rust (jsonpath_plus)
[
{
"key": 44
}
]
Scala (jsonpath)
Not supported
JPError(end of input expected)
Swift (Sextant)
Not supported
NOT_SUPPORTED
dotNET (Json.NET)
Not supported
Unexpected character while parsing path query: (
dotNET (JsonCons.JsonPath)
[
{
"key": 44
}
]
dotNET (JsonPath.Net)
Not supported
Pattern '((@.key<44...' not recognized.
dotNET (JsonPathLib)
[
{
"key": 44
}
]
dotNET (Manatee.Json)
[
{
"key": 44
}
]
JSON (Path_Reference_Implementation)
Not supported
--> 1:3
|
1 | $[?((@.key<44)==false)]
| ^---
|
= expected unionChild, unionArrayIndex, or sliceStart
Proposal (A)
Not supported
x 1:14-1:14 Exponent
| $[?((@.key<44)==false)]
| ^
| x 1:14-1:14 Fraction
| | $[?((@.key<44)==false)]
| | ^
| |
|/
o 1:12-1:14 Number
| $[?((@.key<44)==false)]
| ^^
o 1:12-1:14 SimpleValue
| $[?((@.key<44)==false)]
| ^^
o 1:12-1:14 FilterValue
| $[?((@.key<44)==false)]
| ^^
o 1:6-1:14 HigherPrecedenceFilterExpression
| $[?((@.key<44)==false)]
| ^^^^^^^^
x 1:6-1:6 LogicalOr
| $[?((@.key<44)==false)]
| ^
| x 1:14-1:14 Exponent
| | $[?((@.key<44)==false)]
| | ^
| | x 1:14-1:14 Fraction
| | | $[?((@.key<44)==false)]
| | | ^
| | |
| |/
| o 1:12-1:14 Number
| | $[?((@.key<44)==false)]
| | ^^
| o 1:12-1:14 SimpleValue
| | $[?((@.key<44)==false)]
| | ^^
| o 1:12-1:14 FilterValue
| | $[?((@.key<44)==false)]
| | ^^
| o 1:6-1:14 HigherPrecedenceFilterExpression
| | $[?((@.key<44)==false)]
| | ^^^^^^^^
| x 1:6-1:6 LogicalAnd
| | $[?((@.key<44)==false)]
| | ^
| | x 1:14-1:14 Exponent
| | | $[?((@.key<44)==false)]
| | | ^
| | | x 1:14-1:14 Fraction
| | | | $[?((@.key<44)==false)]
| | | | ^
| | | |
| | |/
| | o 1:12-1:14 Number
| | | $[?((@.key<44)==false)]
| | | ^^
| | o 1:12-1:14 SimpleValue
| | | $[?((@.key<44)==false)]
| | | ^^
| | o 1:12-1:14 FilterValue
| | | $[?((@.key<44)==false)]
| | | ^^
| | o 1:6-1:14 HigherPrecedenceFilterExpression
| | | $[?((@.key<44)==false)]
| | | ^^^^^^^^
| | |
|/ /
| |
|/
o 1:6-1:14 FilterExpression
| $[?((@.key<44)==false)]
| ^^^^^^^^
o 1:5-1:15 UnaryFilterExpression
| $[?((@.key<44)==false)]
| ^^^^^^^^^^
o 1:5-1:15 HigherPrecedenceFilterExpression
| $[?((@.key<44)==false)]
| ^^^^^^^^^^
x 1:5-1:5 LogicalOr
| $[?((@.key<44)==false)]
| ^
| x 1:14-1:14 Exponent
| | $[?((@.key<44)==false)]
| | ^
| | x 1:14-1:14 Fraction
| | | $[?((@.key<44)==false)]
| | | ^
| | |
| |/
| o 1:12-1:14 Number
| | $[?((@.key<44)==false)]
| | ^^
| o 1:12-1:14 SimpleValue
| | $[?((@.key<44)==false)]
| | ^^
| o 1:12-1:14 FilterValue
| | $[?((@.key<44)==false)]
| | ^^
| o 1:6-1:14 HigherPrecedenceFilterExpression
| | $[?((@.key<44)==false)]
| | ^^^^^^^^
| x 1:6-1:6 LogicalOr
| | $[?((@.key<44)==false)]
| | ^
| | x 1:14-1:14 Exponent
| | | $[?((@.key<44)==false)]
| | | ^
| | | x 1:14-1:14 Fraction
| | | | $[?((@.key<44)==false)]
| | | | ^
| | | |
| | |/
| | o 1:12-1:14 Number
| | | $[?((@.key<44)==false)]
| | | ^^
| | o 1:12-1:14 SimpleValue
| | | $[?((@.key<44)==false)]
| | | ^^
| | o 1:12-1:14 FilterValue
| | | $[?((@.key<44)==false)]
| | | ^^
| | o 1:6-1:14 HigherPrecedenceFilterExpression
| | | $[?((@.key<44)==false)]
| | | ^^^^^^^^
| | x 1:6-1:6 LogicalAnd
| | | $[?((@.key<44)==false)]
| | | ^
| | | x 1:14-1:14 Exponent
| | | | $[?((@.key<44)==false)]
| | | | ^
| | | | x 1:14-1:14 Fraction
| | | | | $[?((@.key<44)==false)]
| | | | | ^
| | | | |
| | | |/
| | | o 1:12-1:14 Number
| | | | $[?((@.key<44)==false)]
| | | | ^^
| | | o 1:12-1:14 SimpleValue
| | | | $[?((@.key<44)==false)]
| | | | ^^
| | | o 1:12-1:14 FilterValue
| | | | $[?((@.key<44)==false)]
| | | | ^^
| | | o 1:6-1:14 HigherPrecedenceFilterExpression
| | | | $[?((@.key<44)==false)]
| | | | ^^^^^^^^
| | | |
Errors
PHP (Goessner)
²
ArgumentCountError
PHP (softcreatr-jsonpath)
Error: 'Malformed filter query'
Perl (JSON-Path)
non-safe evaluation, died at main.pl line 11.
Ruby (jsonpath)
comparison of Float with String failed
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.