Filter expression with current object
Setup
Selector: $[?(@)]
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
Results
Other responses
Bash (JSONPath.sh)
[]
C (json-glib)
Not supported
Unable to compile selector `$[?(@)]': Invalid array index definition “?(@)]”
Clojure (json-path)
¹
[
"some value",
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
Cpp (jsoncons)
[
"some value",
"value",
0,
1,
-1,
true
]
Dart (json_path)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
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)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
[
1,
-1,
true
]
[
"some value",
"value",
1,
-1,
[],
{},
true
]
[
true
]
[
[]
]
[
"some value",
"value",
1,
-1,
true
]
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
Haskell (jsonpath)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
JavaScript (Goessner)
²
[
"some value",
"value",
1,
-1,
[],
{},
true
]
JavaScript (brunerd)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
JavaScript (jsonpath)
[
"some value",
"value",
1,
-1,
[],
{},
true
]
JavaScript (jsonpathly)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
Java (com.github.jsurfer)
Not supported
line 1:5 no viable alternative at input '@)]'
org.antlr.v4.runtime.misc.ParseCancellationException
Java (com.jayway.jsonpath)
¹
³
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
Kotlin (com.nfeld.jsonpathkt)
¹
Not supported
Unexpected char, char=?, index=2
Objective-C (SMJJSONPath)
¹
³
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
PHP (galbar-jsonpath)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
[],
true
]
PHP (remorhaz-jsonpath)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
Python (jsonpath)
²
[
"some value",
"value",
1,
-1,
true
]
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)
[
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
]
Python (python-jsonpath)
[
"some value",
null,
"value",
1,
-1,
"",
[],
{},
true
]
Raku (JSON-Path)
Not supported
Evaluation of embedded Perl 6 code not allowed (construct with :allow-eval)
Ruby (jsonpath)
[
"some value",
"value",
0,
1,
-1,
"",
[],
{},
true
]
Rust (jsonpath)
Not supported
parsing error
Rust (jsonpath_lib)
[
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
]
Rust (jsonpath_plus)
[
true
]
Rust (serde_json_path)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
Scala (jsonpath)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
Swift (Sextant)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
dotNET (Json.NET)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
dotNET (JsonCons.JsonPath)
[
"some value",
"value",
0,
1,
-1,
true
]
dotNET (JsonPath.Net)
[
"some value",
null,
"value",
0,
1,
-1,
"",
[],
{},
false,
true
]
dotNET (Manatee.Json)
Not supported
Sequence contains no elements
Errors
JavaScript (jsonpath-plus)
Invalid or unexpected token
PHP (Goessner)
²
ArgumentCountError
PHP (softcreatr-jsonpath)
Error: 'Malformed filter query'
Perl (JSON-Path)
non-safe evaluation, died at main.pl line 11.
dotNET (JsonPathLib)
Unable to cast object of type 'Newtonsoft.Json.Linq.JObject' to type 'System.IConvertible'.
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.