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

Instance of 'ParserException': 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: '$'

Golang (github.com-PaesslerAG-jsonpath) ¹

Not supported

parsing error: $.$	:1:3 - 1:4 unexpected "$" while scanning JSON select expected Ident, "." or "*"

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

"value"

Golang (github.com-ohler55-ojg)

Not supported

Golang (github.com-spyzhov-ajson)

[
  {
    "$": "value"
  }
]

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

[
  "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"
  }
]

JavaScript (jsonpathly)

Not supported

mismatched input '$' expecting {'*', 'true', 'false', 'null', KEY, SPECIAL_KEY, NUMBER}

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}")

Python (python-jsonpath)

Not supported

JSONPathSyntaxError("unexpected token '$'")

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: 
$.$
^^

Rust (serde_json_path)

Not supported

at position 2, in dot member name, must start with lowercase alpha or '_'

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: '$'

Errors

Golang (github.com-oliveagle-jsonpath) ¹

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