Bracket notation with wildcard on object
Setup
Selector: $[*]
{
"some": "string",
"int": 42,
"object": {
"key": "value"
},
"array": [0, 1]
}
Results
Consensus
[
"string",
42,
[
0,
1
],
{
"key": "value"
}
]
Other responses
Bash (JSONPath.sh)
[
"string",
"value",
0,
1,
42
]
C (json-glib)
[
{
"array": [
0,
1
],
"int": 42,
"object": {
"key": "value"
},
"some": "string"
}
]
Elixir (ExJsonPath)
Not supported
syntax error before: '*'
Python (jsonpath-ng)
[
{
"array": [
0,
1
],
"int": 42,
"object": {
"key": "value"
},
"some": "string"
}
]
Python (jsonpath-rw)
[
{
"array": [
0,
1
],
"int": 42,
"object": {
"key": "value"
},
"some": "string"
}
]
Ruby (jsonpath)
[
null,
null,
null,
null
]
Rust (jsonpath)
Not supported
parsing error
Scala (jsonpath)
[]
dotNET (Json.NET)
[]
Errors
object is not Slice
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.