Dot notation without root and dot
Setup
Selector: key
{
"key": "value"
}
Results
Other responses
Bash (JSONPath.sh)
[
"value"
]
C (json-glib)
Not supported
Unable to compile selector `key': Invalid first character “k”
Clojure (json-path)
¹
null
Cpp (jsoncons)
Not supported
Syntax error at line 1 and column 4
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: <<"key">>
Erlang (ejsonpath)
Not supported
syntax error before: <<"key">>
[
"value"
]
"value"
[
"value"
]
Not supported
wrong symbol 'k' at 0
[
"value"
]
Haskell (jsonpath)
Not supported
Invalid JSONPath: key
Error: 1:1:
|
1 | key
| ^^
unexpected "ke"
expecting ".*", "..", '$', '.', '[', or white space
JavaScript (Goessner)
²
[
"value"
]
JavaScript (brunerd)
Not supported
JavaScript (jsonpath)
[
"value"
]
JavaScript (jsonpath-plus)
[
"value"
]
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)
²
[
"value"
]
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)
²
[
"value"
]
Python (jsonpath-ng)
[
"value"
]
Python (jsonpath-rw)
[
"value"
]
Python (jsonpath2)
Not supported
line 1:0 mismatched input 'key' expecting '$'
ValueError("line 1:0 mismatched input 'key' expecting '$'")
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 'k' 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)
[
"value"
]
dotNET (Manatee.Json)
Not supported
Unrecognized JSON Path element. 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.