Dot notation with single quotes and dot

Setup

Selector: $.'some.key'

{"some.key": 42, "some": {"key": "value"}, "'some.key'": 43}

Results

Other responses

Bash (JSONPath.sh)

[
  42
]

C (json-glib)

[]

Clojure (json-path) ¹

"value"

Cpp (jsoncons)

[
  42
]

Dart (json_path)

Not supported

FormatException: end of input expected at 1:2. Expression: $.'some.key'

Elixir (ExJsonPath)

Not supported

syntax error before: {string,1,<<"some.key">>}

Elixir (jaxon)

[]

Elixir (warpath) ¹

Not supported

Parser error: Invalid token on line 1, syntax error before: <<"some.key">>

Golang (github.com-AsaiYusuke-jsonpath) ²

Not supported

invalid syntax (position=1, reason=unrecognized input, near=.'some.key')

Golang (github.com-PaesslerAG-jsonpath) ¹

Not supported

parsing error: $.'some.key'	:1:3 - 1:13 unexpected Char while scanning JSON select expected Ident, "." or "*"

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

42

Golang (github.com-ohler55-ojg)

Not supported

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

[]

Haskell (jsonpath)

Not supported

Invalid JSONPath: $.'some.key'
 Error: 1:3:
  |
1 | $.'some.key'
  |   ^
unexpected '''
expecting '.' or white space

JavaScript (Goessner) ²

[
  "value"
]

JavaScript (brunerd)

Not supported

JavaScript (jsonpath)

Not supported

Parse error on line 1:
$.'some.key'
--^
Expecting 'STAR', 'IDENTIFIER', 'SCRIPT_EXPRESSION', 'INTEGER', 'END', got 'Q_STRING'

JavaScript (jsonpath-plus)

[
  "value"
]

Java (com.github.jsurfer)

Not supported

line 1:2 no viable alternative at input '.'some.key''
org.antlr.v4.runtime.misc.ParseCancellationException

Java (com.jayway.jsonpath) ¹ ³

Not found

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.PathNotFoundException: Missing property in path $[''some']

Kotlin (com.nfeld.jsonpathkt) ¹

null

Objective-C (SMJJSONPath) ¹ ³

Not found

Missing property in path $[''some']

PHP (Goessner) ²

[
  "value"
]

PHP (galbar-jsonpath) ²

Not supported

Invalid JSONPath error: 'Error in JSONPath near '.'some.key'''

PHP (remorhaz-jsonpath)

[
  42
]

PHP (softcreatr-jsonpath)

Not supported

Error: 'Unable to parse token 'some in expression: .'some.key''

Perl (JSON-Path)

[
  42
]

Python (jsonpath) ²

[
  "value"
]

Python (jsonpath-ng)

[
  42
]

Python (jsonpath-rw)

[
  42
]

Python (jsonpath2)

Not supported

line 1:2 token recognition error at: '''
ValueError("line 1:2 token recognition error at: '''")

Raku (JSON-Path)

Not supported

JSON path parse error at position 1

Ruby (jsonpath)

[
  42
]

Rust (jsonpath)

Not supported

parsing error

Rust (jsonpath_lib)

Not supported

path error: 
$.'some.key'
^^

Scala (jsonpath)

[]

Swift (Sextant)

[]

dotNET (Json.NET)

[]

dotNET (JsonCons.JsonPath)

[
  42
]

dotNET (JsonPath.Net)

Not supported

Could not find any valid selectors.

dotNET (JsonPathLib)

[
  "value"
]

dotNET (Manatee.Json)

[
  42
]

JSON (Path_Reference_Implementation)

Not supported

 --> 1:3
  |
1 | $.'some.key'
  |   ^---
  |
  = expected childName

Proposal (A)

Not supported


x 1:3-1:3 DotChildName
| $.'some.key'
|   ^
x 1:2-1:2 DotChild
| $.'some.key'
|  ^
x 1:2-1:2 Operator
| $.'some.key'
|  ^
o 1:1-1:2 Start
  $.'some.key'
  ^

Errors

Erlang (ejsonpath)

init terminating in do_boot (function_clause)

Crash dump is being written to: /dev/null...done
{"init terminating in do_boot",function_clause}

Golang (github.com-oliveagle-jsonpath) ¹

key error: 'some not found in object

Golang (github.com-spyzhov-ajson)

unexpected end of file

Rust (jsonpath_plus)

Error Parsing JSON Path:
$.'some.key'
panic occurred

Footnotes