Dot notation with empty path
Setup
Selector: $.
{"key": 42, "": 9001, "''": "nice"}
Results
Consensus
Not supported
Other responses
Bash (JSONPath.sh)
[]
Clojure (json-path)
¹
{
"": 9001,
"''": "nice",
"key": 42
}
Elixir (jaxon)
[
{
"": 9001,
"''": "nice",
"key": 42
}
]
Erlang (ejsonpath)
[
{
"": 9001,
"''": "nice",
"key": 42
}
]
9001
[
{
"": 9001,
"''": "nice",
"key": 42
}
]
JavaScript (Goessner)
²
[
{
"": 9001,
"''": "nice",
"key": 42
}
]
JavaScript (jsonpath-plus)
[
{
"": 9001,
"''": "nice",
"key": 42
}
]
PHP (Goessner)
²
Not found
jsonpath returned false, this might indicate an error
PHP (softcreatr-jsonpath)
[
{
"": 9001,
"''": "nice",
"key": 42
}
]
Perl (JSON-Path)
[
""
]
Python (jsonpath)
²
Not found
jsonpath returned false, this might indicate an error
Python (python-jsonpath)
[
{
"": 9001,
"''": "nice",
"key": 42
}
]
Ruby (jsonpath)
[
{
"": 9001,
"''": "nice",
"key": 42
}
]
dotNET (JsonPathLib)
[
{
"": 9001,
"''": "nice",
"key": 42
}
]
Errors
path: unexpected end of path at 2
Rust (jsonpath_plus)
Error Parsing JSON Path:
$.
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.