Empty
Setup
Selector:
{"a": 42, "": 21}
Results
Other responses
Bash (JSONPath.sh)
[
42,
21
]
Clojure (json-path)
¹
null
Cpp (jsoncons)
Not supported
Unexpected EOF while parsing jsonpath expression at line 1 and column 1
Dart (json_path)
Not supported
FormatException: "$" expected at 1:1. Expression:
Elixir (ExJsonPath)
Not supported
syntax error before:
Elixir (warpath)
¹
Not supported
Parser error: Invalid token on line 999999, syntax error before:
Erlang (ejsonpath)
Not supported
syntax error before:
Not supported
invalid syntax (position=0, reason=unrecognized input, near=)
Not supported
parsing error: - 1:1 unexpected EOF while scanning extensions
[]
Not supported
EOF
[
{
"": 21,
"a": 42
}
]
Haskell (jsonpath)
[
{
"": 21,
"a": 42
}
]
JavaScript (jsonpath-plus)
[
21
]
Java (com.github.jsurfer)
Not supported
org.antlr.v4.runtime.misc.ParseCancellationException
Kotlin (com.nfeld.jsonpathkt)
¹
Not supported
Path cannot be empty
Objective-C (SMJJSONPath)
¹
³
Not supported
path can't be nil or empty
PHP (Goessner)
²
null
PHP (galbar-jsonpath)
²
Not supported
Invalid JSONPath error: 'Error in JSONPath near '''
PHP (remorhaz-jsonpath)
Not supported
Error: 'Failed to build AST from JSONPath query: '
PHP (softcreatr-jsonpath)
[
{
"": 21,
"a": 42
}
]
Python (jsonpath)
²
Not found
jsonpath returned false, this might indicate an error
Python (jsonpath-ng)
Not supported
AttributeError("'NoneType' object has no attribute 'lineno'")
Python (jsonpath-rw)
Not supported
AttributeError("'NoneType' object has no attribute 'lineno'")
Python (jsonpath2)
Not supported
line 1:0 missing '$' at '<EOF>'
ValueError("line 1:0 missing '$' at '<EOF>'")
Raku (JSON-Path)
Not supported
JSON path parse error at position 0
Ruby (jsonpath)
[
{
"": 21,
"a": 42
}
]
Rust (jsonpath)
Not supported
parsing error
Rust (jsonpath_lib)
Not supported
path error:
Scala (jsonpath)
Not supported
JPError('$' expected but end of source found)
Swift (Sextant)
Not supported
NOT_SUPPORTED
dotNET (Json.NET)
[
{
"": 21,
"a": 42
}
]
dotNET (JsonCons.JsonPath)
Not supported
Invalid state 1
dotNET (JsonPath.Net)
Not supported
Input string is empty
dotNET (JsonPathLib)
[
{
"": 21,
"a": 42
}
]
JSON (Path_Reference_Implementation)
Not supported
--> 1:1
|
1 |
| ^---
|
= expected rootSelector
Proposal (A)
Not supported
x 1:1-1:1 Start
|
| ^
Errors
C (json-glib)
json_path_match: assertion 'path->is_compiled' failed
Expecting value: line 2 column 1 (char 1)
Elixir (jaxon)
** (ArgumentError) Empty query given
lib/jaxon/decoders/query.ex:16: Jaxon.Decoders.Query.query/2
lib/jsonpath.ex:8: Mix.Tasks.Execute.run/1
path: empty
runtime error: index out of range [0] with length 0
JavaScript (Goessner)
²
undefined
JavaScript (brunerd)
undefined
JavaScript (jsonpath)
we need a path
Java (com.jayway.jsonpath)
¹
³
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.
Exception in thread "main" java.lang.IllegalArgumentException: path can not be null or empty
at com.jayway.jsonpath.internal.Utils.notEmpty(Utils.java:401)
at com.jayway.jsonpath.internal.JsonContext.read(JsonContext.java:76)
at query.App.main(App.java:28)
Perl (JSON-Path)
Missing required argument 'expression' in constructor at build/lib/perl5/JSON/Path.pm line 103.
Rust (jsonpath_plus)
Error Parsing JSON Path:
panic occurred
dotNET (Manatee.Json)
Object reference not set to an instance of an object.
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.