Dot notation after recursive descent with extra dot
Setup
Selector: $...key
{
"object": {
"key": "value",
"array": [
{"key": "something"},
{"key": {"key": "russian dolls"}}
]
},
"key": "top"
}
Results
Other responses
Bash (JSONPath.sh)
[
"russian dolls",
"something",
"top",
"value"
]
C (json-glib)
[]
Clojure (json-path)
¹
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
Cpp (jsoncons)
Not supported
Expected unquoted string, or single or double quoted string, or index or '*' at line 1 and column 4
Dart (json_path)
Not supported
Instance of 'ParserException': end of input expected (at 1:2)
Elixir (ExJsonPath)
Not supported
syntax error before: '.'
Elixir (jaxon)
[
"top"
]
Elixir (warpath)
¹
Not supported
Parser error: Invalid token on line 1, operator dot ('.') is not allowed after descendant operator ('..'),
it must be contracted in a operator (..),
For example: instead of '$...name' you must write '$..name', that is the right syntax!
Erlang (ejsonpath)
Not supported
syntax error before: '.'
Not supported
parsing error: $...key :1:4 - 1:5 unexpected "." while scanning JSON mapper expected "[", Ident or "*"
[]
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
[
"russian dolls",
"russian dolls",
"russian dolls",
"russian dolls",
"russian dolls",
"something",
"something",
"something",
"something",
"top",
"value",
"value",
{
"key": "russian dolls"
},
{
"key": "russian dolls"
},
{
"key": "russian dolls"
},
{
"key": "russian dolls"
}
]
Not supported
child name or array access or filter missing after recursive descent at position 3, following "$.."
Haskell (jsonpath)
[
"russian dolls",
"russian dolls",
"russian dolls",
"russian dolls",
"russian dolls",
"something",
"something",
"something",
"something",
"top",
"value",
"value",
{
"key": "russian dolls"
},
{
"key": "russian dolls"
},
{
"key": "russian dolls"
},
{
"key": "russian dolls"
}
]
JavaScript (Goessner)
²
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
JavaScript (brunerd)
Not supported
JavaScript (jsonpath)
Not supported
Parse error on line 1:
$...key
---^
Expecting 'STAR', 'IDENTIFIER', 'SCRIPT_EXPRESSION', 'INTEGER', 'END', '[', got 'DOT'
JavaScript (jsonpath-plus)
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
JavaScript (jsonpathly)
Not supported
extraneous input '.' expecting {'*', 'true', 'false', 'null', '[', KEY, SPECIAL_KEY}
Java (com.github.jsurfer)
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
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: Character '.' on position 3 is not valid.
Kotlin (com.nfeld.jsonpathkt)
¹
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
Objective-C (SMJJSONPath)
¹
³
Not supported
Character '.' on position 3 is not valid.
PHP (Goessner)
²
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
PHP (galbar-jsonpath)
[
"russian dolls",
"russian dolls",
"russian dolls",
"russian dolls",
"russian dolls",
"something",
"something",
"something",
"something",
"top",
"value",
"value",
{
"key": "russian dolls"
},
{
"key": "russian dolls"
},
{
"key": "russian dolls"
},
{
"key": "russian dolls"
}
]
PHP (remorhaz-jsonpath)
Not supported
Error: 'Failed to build AST from JSONPath query: $...key'
PHP (softcreatr-jsonpath)
[
"russian dolls",
"russian dolls",
"russian dolls",
"russian dolls",
"russian dolls",
"something",
"something",
"something",
"something",
"top",
"value",
"value",
{
"key": "russian dolls"
},
{
"key": "russian dolls"
},
{
"key": "russian dolls"
},
{
"key": "russian dolls"
}
]
Perl (JSON-Path)
[]
Python (jsonpath)
²
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
Python (jsonpath-ng)
Not supported
JsonPathParserError('Parse error at 1:3 near token . (.)')
Python (jsonpath-rw)
Not supported
Exception('Parse error at 1:3 near token . (.)')
Python (jsonpath2)
Not supported
line 1:3 extraneous input '.' expecting {'*', '[', ID}
ValueError("line 1:3 extraneous input '.' expecting {'*', '[', ID}")
Python (python-jsonpath)
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
Raku (JSON-Path)
[
"russian dolls",
"something",
"value",
{
"key": "russian dolls"
}
]
Ruby (jsonpath)
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
Rust (jsonpath)
Not supported
parsing error
Rust (jsonpath_lib)
Not supported
path error:
$...key
^^^^
Rust (jsonpath_plus)
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
Rust (serde_json_path)
Not supported
at position 3, must start with lowercase alpha or '_'
Scala (jsonpath)
Not supported
JPError(end of input expected)
Swift (Sextant)
Not supported
NOT_SUPPORTED
dotNET (Json.NET)
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
dotNET (JsonCons.JsonPath)
Not supported
Expected unquoted string, or single or double quoted string, or index or '*'
dotNET (JsonPath.Net)
Not supported
Could not find any valid selectors.
dotNET (JsonPathLib)
[
"russian dolls",
"something",
"top",
"value",
{
"key": "russian dolls"
}
]
dotNET (Manatee.Json)
Not supported
Unrecognized JSON Path element. Path up to error: '$'
Errors
expression don't support in filter
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.