Dot notation with key root literal
Setup
Selector: $.$
{
"$": "value"
}
Results
Other responses
Bash (JSONPath.sh)
[]
C (json-glib)
[
"value"
]
Clojure (json-path)
¹
{
"$": "value"
}
Cpp (jsoncons)
[]
Dart (json_path)
Not supported
FormatException: end of input expected at 1:2. Expression: $.$
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
invalid syntax (position=1, reason=unrecognized input, near=.$)
Not supported
parsing error: $.$ :1:3 - 1:4 unexpected "$" while scanning JSON select expected Ident, "." or "*"
"value"
Not supported
[
{
"$": "value"
}
]
[
"value"
]
Haskell (jsonpath)
Not supported
Invalid JSONPath: $.$
Error: 1:3:
|
1 | $.$
| ^
unexpected '$'
expecting '.' or white space
JavaScript (Goessner)
²
[
"value"
]
JavaScript (brunerd)
[
"value"
]
JavaScript (jsonpath)
Not supported
Parse error on line 1:
$.$
--^
Expecting 'STAR', 'IDENTIFIER', 'SCRIPT_EXPRESSION', 'INTEGER', 'END', got 'DOLLAR'
JavaScript (jsonpath-plus)
[
{
"$": "value"
}
]
Java (com.github.jsurfer)
Not supported
line 1:2 no viable alternative at input '.$'
org.antlr.v4.runtime.misc.ParseCancellationException
Java (com.jayway.jsonpath)
¹
³
"value"
Kotlin (com.nfeld.jsonpathkt)
¹
"value"
Objective-C (SMJJSONPath)
¹
³
"value"
PHP (Goessner)
²
[
"value"
]
PHP (galbar-jsonpath)
²
[
"value"
]
PHP (remorhaz-jsonpath)
Not supported
Error: 'Failed to build AST from JSONPath query: $.$'
PHP (softcreatr-jsonpath)
Not supported
Error: 'Unable to parse token $ in expression: .$'
Python (jsonpath)
²
[
"value"
]
Python (jsonpath-ng)
[
{
"$": "value"
}
]
Python (jsonpath-rw)
[
{
"$": "value"
}
]
Python (jsonpath2)
Not supported
line 1:2 mismatched input '$' expecting {'*', ID}
ValueError("line 1:2 mismatched input '$' expecting {'*', ID}")
Raku (JSON-Path)
Not supported
JSON path parse error at position 1
Ruby (jsonpath)
[
{
"$": "value"
}
]
Rust (jsonpath)
Not supported
parsing error
Rust (jsonpath_lib)
Not supported
path error:
$.$
^^
Scala (jsonpath)
[
"value"
]
Swift (Sextant)
[
"value"
]
dotNET (Json.NET)
[
"value"
]
dotNET (JsonCons.JsonPath)
Not supported
Expected unquoted string, or single or double quoted string, or index or '*'
dotNET (JsonPath.Net)
Not supported
Could not find any valid selectors.
dotNET (JsonPathLib)
[
"value"
]
dotNET (Manatee.Json)
Not supported
Unrecognized JSON Path element. Path up to error: '$'
JSON (Path_Reference_Implementation)
Not supported
--> 1:3
|
1 | $.$
| ^---
|
= expected childName
Proposal (A)
[
"value"
]
Errors
expression don't support in filter
Perl (JSON-Path)
Assertion ("$" is not an operator) failed!
at build/lib/perl5/Carp/Assert.pm line 282, <STDIN> line 3.
Carp::Assert::assert(...) called at build/lib/perl5/JSON/Path/Evaluator.pm line 215
JSON::Path::Evaluator::_evaluate(...) called at build/lib/perl5/JSON/Path/Evaluator.pm line 120
JSON::Path::Evaluator::evaluate(...) called at build/lib/perl5/JSON/Path/Evaluator.pm line 93
JSON::Path::Evaluator::evaluate_jsonpath(...) called at build/lib/perl5/JSON/Path.pm line 103
JSON::Path::values(...) called at main.pl line 11
Rust (jsonpath_plus)
Error Parsing JSON Path:
$.$
panic occurred
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.