Dot notation with space padded key
Setup
Selector: $. a
{" a": 1, "a": 2, " a ": 3, "": 4}
Results
Other responses
Bash (JSONPath.sh)
[
3
]
C (json-glib)
[
3
]
Clojure (json-path)
¹
2
Cpp (jsoncons)
[
2
]
Dart (json_path)
Not supported
Instance of 'ParserException': end of input expected (at 1:2)
Elixir (ExJsonPath)
[
2
]
Elixir (jaxon)
[
3
]
Elixir (warpath)
¹
2
Erlang (ejsonpath)
[
2
]
2
2
Not supported
3
[
3
]
Not supported
child name missing at position 2, following "$."
Haskell (jsonpath)
Not supported
Invalid JSONPath: $. a
Error: 1:3:
|
1 | $. a
| ^
unexpected space
expecting '.' or white space
JavaScript (Goessner)
²
[
3
]
JavaScript (brunerd)
Not supported
JavaScript (jsonpath)
Not supported
Lexical error on line 1. Unrecognized text.
$. a
--^
JavaScript (jsonpath-plus)
[
3
]
JavaScript (jsonpathly)
[
2
]
Java (com.github.jsurfer)
[
2
]
Java (com.jayway.jsonpath)
¹
³
Not supported
SLF4J(W): No SLF4J providers were found.
SLF4J(W): Defaulting to no-operation (NOP) logger implementation
SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
com.jayway.jsonpath.InvalidPathException: Could not parse token starting at position 2
Kotlin (com.nfeld.jsonpathkt)
¹
1
Objective-C (SMJJSONPath)
¹
³
Not supported
Could not parse token starting at position 2
PHP (Goessner)
²
[
3
]
PHP (galbar-jsonpath)
Not supported
Invalid JSONPath error: 'Error in JSONPath near '. a ''
PHP (remorhaz-jsonpath)
Not supported
Error: 'Failed to build AST from JSONPath query: $. a '
PHP (softcreatr-jsonpath)
Not supported
Error: 'Unable to parse token a in expression: . a'
Perl (JSON-Path)
[
3
]
Python (jsonpath)
²
[
3
]
Python (jsonpath-ng)
[
2
]
Python (jsonpath-rw)
[
2
]
Python (jsonpath2)
[
2
]
Python (python-jsonpath)
[
2
]
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:
$. a
^^
Rust (serde_json_path)
Not supported
at position 2, in dot member name, must start with lowercase alpha or '_'
Scala (jsonpath)
[
2
]
Swift (Sextant)
Not supported
NOT_SUPPORTED
dotNET (Json.NET)
Not supported
Unexpected character while parsing path:
dotNET (JsonCons.JsonPath)
[
2
]
dotNET (JsonPath.Net)
[
1
]
dotNET (JsonPathLib)
[
3
]
dotNET (Manatee.Json)
Not supported
Unrecognized JSON Path element. Path up to error: '$'
Errors
Rust (jsonpath_plus)
Error Parsing JSON Path:
$. a
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.