Union with repeated matches after dot notation with wildcard
Setup
Selector: $.*[0,:5]
{
"a": [
"string",
null,
true
],
"b": [
false,
"string",
5.4
]
}
Results
Other responses
Bash (JSONPath.sh)
[]
C (json-glib)
Not supported
Unable to compile selector `$.*[0,:5]': Invalid set definition “0,:5]”
Clojure (json-path)
¹
[
"string",
false
]
Cpp (jsoncons)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
Dart (json_path)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
Elixir (ExJsonPath)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
Elixir (jaxon)
[]
Elixir (warpath)
¹
Not supported
Parser error: Invalid token on line 1, syntax error before: <<":">>
Erlang (ejsonpath)
Not supported
syntax error before: ':'
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
Not supported
parsing error: $.*[0,:5] :1:7 - 1:8 mixed 44 and 58 in JSON bracket
Not supported
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
Haskell (jsonpath)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
JavaScript (Goessner)
²
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
JavaScript (brunerd)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
JavaScript (jsonpath)
[
"string",
null,
true,
false,
"string",
5.4
]
JavaScript (jsonpath-plus)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
Java (com.github.jsurfer)
Not supported
org.antlr.v4.runtime.misc.ParseCancellationException
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: Failed to parse SliceOperation: 0,:5
Kotlin (com.nfeld.jsonpathkt)
¹
[
"string",
false
]
Objective-C (SMJJSONPath)
¹
³
Not supported
Failed to parse SliceOperation: 0,:5
PHP (Goessner)
²
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
PHP (galbar-jsonpath)
²
Not supported
Invalid JSONPath error: 'Error in JSONPath near '0,:5''
PHP (remorhaz-jsonpath)
Not supported
Error: 'Failed to build AST from JSONPath query: $.*[0,:5]'
Perl (JSON-Path)
[
false,
"string",
5.4,
"string",
null,
true
]
Python (jsonpath)
²
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
Python (jsonpath-ng)
Not supported
JsonPathParserError('Parse error at 1:5 near token , (,)')
Python (jsonpath-rw)
Not supported
Exception('Parse error at 1:5 near token , (,)')
Python (jsonpath2)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
Raku (JSON-Path)
Not supported
JSON path parse error at position 3
Rust (jsonpath)
Not supported
parsing error
Rust (jsonpath_lib)
Not supported
path error:
$.*[0,:5]
^^^^^^^
Rust (jsonpath_plus)
[
"string",
false,
"string",
null,
true,
false,
"string",
5.4
]
Scala (jsonpath)
Not supported
JPError(end of input expected)
Swift (Sextant)
Not supported
NOT_SUPPORTED
dotNET (Json.NET)
[
"string",
false
]
dotNET (JsonCons.JsonPath)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
dotNET (JsonPath.Net)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
dotNET (JsonPathLib)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
dotNET (Manatee.Json)
[
"string",
null,
true,
false,
"string",
5.4
]
JSON (Path_Reference_Implementation)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
Proposal (A)
[
"string",
"string",
null,
true,
false,
false,
"string",
5.4
]
Errors
path: invalid character at 6
key error: * not found in object
wrong request: wrong request: 0,:5
PHP (softcreatr-jsonpath)
TypeError
Ruby (jsonpath)
0 is not a symbol nor a string
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.