Dot notation without root
Setup
Selector: .key
{
"key": "value"
}
Results
Other responses
Bash (JSONPath.sh)
[
"value"
]
C (json-glib)
[
"value"
]
Clojure (json-path)
¹
null
Cpp (jsoncons)
Not supported
Expected '$' or function expression at line 1 and column 1
Dart (json_path)
Not supported
FormatException: "$" expected at 1:1. Expression: .key
Elixir (ExJsonPath)
[
"value"
]
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=0, reason=unrecognized input, near=.key)
Not supported
parsing error: .key :1:1 - 1:2 unexpected "." while scanning extensions
[
"value"
]
[]
[
"value"
]
Haskell (jsonpath)
[
"value"
]
JavaScript (Goessner)
²
Not found
jsonpath returned false, this might indicate an error
JavaScript (brunerd)
Not supported
JavaScript (jsonpath)
Not supported
Parse error on line 1:
.key
^
Expecting 'DOLLAR', 'STAR', 'IDENTIFIER', 'SCRIPT_EXPRESSION', 'INTEGER', 'END', got 'DOT'
JavaScript (jsonpath-plus)
[]
Java (com.github.jsurfer)
Not supported
org.antlr.v4.runtime.misc.ParseCancellationException
Java (com.jayway.jsonpath)
¹
³
[
"value"
]
Kotlin (com.nfeld.jsonpathkt)
¹
"value"
Objective-C (SMJJSONPath)
¹
³
[
"value"
]
PHP (Goessner)
²
Not found
jsonpath returned false, this might indicate an error
PHP (galbar-jsonpath)
²
Not supported
Invalid JSONPath error: 'Error in JSONPath near '.key''
PHP (remorhaz-jsonpath)
Not supported
Error: 'Failed to build AST from JSONPath query: .key'
PHP (softcreatr-jsonpath)
[
"value"
]
Perl (JSON-Path)
[
"value"
]
Python (jsonpath)
²
Not found
jsonpath returned false, this might indicate an error
Python (jsonpath-ng)
Not supported
JsonPathParserError('Parse error at 1:0 near token . (.)')
Python (jsonpath-rw)
Not supported
Exception('Parse error at 1:0 near token . (.)')
Python (jsonpath2)
Not supported
line 1:0 missing '$' at '.'
ValueError("line 1:0 missing '$' at '.'")
Raku (JSON-Path)
[
"value"
]
Ruby (jsonpath)
[
"value"
]
Rust (jsonpath)
Not supported
parsing error
Rust (jsonpath_lib)
Not supported
path error:
.key
^
Scala (jsonpath)
Not supported
JPError('$' expected but '.' found)
Swift (Sextant)
[
"value"
]
dotNET (Json.NET)
[
"value"
]
dotNET (JsonCons.JsonPath)
Not supported
Syntax error
dotNET (JsonPath.Net)
Not supported
Path must start with '$'
dotNET (JsonPathLib)
[]
dotNET (Manatee.Json)
Not supported
Start token not found. Path up to error: ''
JSON (Path_Reference_Implementation)
Not supported
--> 1:1
|
1 | .key
| ^---
|
= expected rootSelector
Proposal (A)
Not supported
x 1:1-1:1 Start
| .key
| ^
Errors
path: $ expected
should start with '$'
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.