You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading from v0.144.0 I encountered an issue when using an empty json path:
With the old version I got an exception thrown "The provided JSONPath is incorrect.".
With the new version, an empty result is returned.
I thought that an empty json path is invalid?
What is the expected behavior?
Exception thrown when using an empty json path (= invalid) on calling json_query
What is the actual behavior?
An empty result is returned.
Enumerate the steps to reproduce the bug
query jsoncons::jsonpath::json_query with an empty path
Include a small, self-contained example if possible
auto json = jsoncons::json::parse(R"({ "a": 1 })");
auto path = "";
auto result = jsoncons::jsonpath::json_query(json, path);
// expected: exception jsoncons::jsonpath::jsonpath_error thrown// actual: result.empty() == true
What compiler, architecture, and operating system?
Compiler: MSVC / clang
Architecture: x64
Operating system: Windows, Linux (Debian)
What jsoncons library version?
Latest release v0.160.0
The text was updated successfully, but these errors were encountered:
Reopening. It was changed, but I'm no longer sure that was right. We're currently working on a major rewrite of the jsonpath extension, and may reconsider that. Generally, we want syntax errors in the path expression to be reported, and execution errors when applying the path to a particular JSON instance to result in an empty array.
After upgrading from v0.144.0 I encountered an issue when using an empty json path:
With the old version I got an exception thrown "The provided JSONPath is incorrect.".
With the new version, an empty result is returned.
I thought that an empty json path is invalid?
What is the expected behavior?
Exception thrown when using an empty json path (= invalid) on calling json_query
What is the actual behavior?
An empty result is returned.
Enumerate the steps to reproduce the bug
query jsoncons::jsonpath::json_query with an empty path
Include a small, self-contained example if possible
What compiler, architecture, and operating system?
What jsoncons library version?
The text was updated successfully, but these errors were encountered: