Bracket notation with two literals separated by dot
Setup
Selector: $['two'.'some']
{
"one": {"key": "value"},
"two": {"some": "more", "key": "other value"},
"two.some": "42",
"two'.'some": "43"
}
Results
Consensus
Not supported
Other responses
Bash (JSONPath.sh)
[
"more"
]
C (json-glib)
[
{
"key": "other value",
"some": "more"
}
]
Elixir (jaxon)
[]
[]
JavaScript (Goessner)
²
[
"43"
]
JavaScript (jsonpath-plus)
[
"43"
]
PHP (Goessner)
²
[
"43"
]
PHP (galbar-jsonpath)
²
[
"43"
]
PHP (softcreatr-jsonpath)
[
"43"
]
Perl (JSON-Path)
[]
Python (jsonpath)
²
[
"more"
]
Ruby (jsonpath)
[
"43"
]
dotNET (JsonPathLib)
[
"more"
]
Errors
Clojure (json-path)
¹
java.lang.Exception object must be an array.
path: invalid character at 7
strconv.Atoi: parsing "'two'.'some'": invalid syntax
Rust (jsonpath_plus)
Error Parsing JSON Path:
$['two'.'some']
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.