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
FormatException: end of input expected at 1:2. Expression: $. a
Elixir (ExJsonPath)
[
2
]
Elixir (jaxon)
[
3
]
Elixir (warpath)
¹
2
Erlang (ejsonpath)
[
2
]
Not supported
invalid syntax (position=1, reason=unrecognized input, near=. a )
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
]
Java (com.github.jsurfer)
[
2
]
Java (com.jayway.jsonpath)
¹
³
Not supported
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder 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
]
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
^^
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: '$'
JSON (Path_Reference_Implementation)
Not supported
--> 1:3
|
1 | $. a
| ^---
|
= expected childName
Proposal (A)
Not supported
x 1:3-1:3 DotChildName
| $. a
| ^
x 1:2-1:2 DotChild
| $. a
| ^
x 1:2-1:2 Operator
| $. a
| ^
o 1:1-1:2 Start
$. a
^
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.