Dot notation with double quotes
Setup
Selector: $."key"
{
"key": "value",
"\"key\"": 42
}
Results
Other responses
Bash (JSONPath.sh)
[
"value"
]
C (json-glib)
[
42
]
Clojure (json-path)
¹
null
Cpp (jsoncons)
[
"value"
]
Dart (json_path)
Not supported
FormatException: end of input expected at 1:2. Expression: $."key"
Elixir (ExJsonPath)
Not supported
syntax error before: {string,1,<<"key">>}
Elixir (jaxon)
[
"value"
]
Elixir (warpath)
¹
Not supported
Parser error: Invalid token on line 1, syntax error before: <<"key">>
Not supported
invalid syntax (position=1, reason=unrecognized input, near=."key")
Not supported
parsing error: $."key" :1:3 - 1:8 unexpected String while scanning JSON select expected Ident, "." or "*"
"value"
Not supported
42
[
"value"
]
[
42
]
Haskell (jsonpath)
Not supported
Invalid JSONPath: $."key"
Error: 1:3:
|
1 | $."key"
| ^
unexpected '"'
expecting '.' or white space
JavaScript (Goessner)
²
[
42
]
JavaScript (brunerd)
Not supported
JavaScript (jsonpath)
Not supported
Parse error on line 1:
$."key"
--^
Expecting 'STAR', 'IDENTIFIER', 'SCRIPT_EXPRESSION', 'INTEGER', 'END', got 'QQ_STRING'
JavaScript (jsonpath-plus)
[]
Java (com.github.jsurfer)
Not supported
line 1:2 no viable alternative at input '."key"'
org.antlr.v4.runtime.misc.ParseCancellationException
Java (com.jayway.jsonpath)
¹
³
42
Kotlin (com.nfeld.jsonpathkt)
¹
42
Objective-C (SMJJSONPath)
¹
³
42
PHP (Goessner)
²
[
42
]
PHP (galbar-jsonpath)
²
Not supported
Invalid JSONPath error: 'Error in JSONPath near '."key"''
PHP (remorhaz-jsonpath)
[
"value"
]
PHP (softcreatr-jsonpath)
[
"value"
]
Perl (JSON-Path)
[
"value"
]
Python (jsonpath)
²
[
42
]
Python (jsonpath-ng)
[
"value"
]
Python (jsonpath-rw)
[
"value"
]
Python (jsonpath2)
Not supported
line 1:2 mismatched input '"key"' expecting {'*', ID}
ValueError('line 1:2 mismatched input \'"key"\' expecting {\'*\', ID}')
Raku (JSON-Path)
Not supported
JSON path parse error at position 1
Ruby (jsonpath)
[]
Rust (jsonpath)
Not supported
parsing error
Rust (jsonpath_lib)
Not supported
path error:
$."key"
^^
Scala (jsonpath)
[
42
]
Swift (Sextant)
[
42
]
dotNET (Json.NET)
[
42
]
dotNET (JsonCons.JsonPath)
[
"value"
]
dotNET (JsonPath.Net)
Not supported
Could not find any valid selectors.
dotNET (JsonPathLib)
[
42
]
dotNET (Manatee.Json)
[
"value"
]
JSON (Path_Reference_Implementation)
Not supported
--> 1:3
|
1 | $."key"
| ^---
|
= expected childName
Proposal (A)
Not supported
x 1:3-1:3 DotChildName
| $."key"
| ^
x 1:2-1:2 DotChild
| $."key"
| ^
x 1:2-1:2 Operator
| $."key"
| ^
o 1:1-1:2 Start
$."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}
Rust (jsonpath_plus)
Error Parsing JSON Path:
$."key"
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.