-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from hiltontj/hiltontj/49-false--positives-fro…
…m-filters [#49] Fix bug producing false positives in filters
- Loading branch information
Showing
4 changed files
with
36 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use serde_json::json; | ||
use serde_json_path::JsonPath; | ||
#[cfg(feature = "trace")] | ||
use test_log::test; | ||
|
||
// This test is meant for issue #49, which can be found here: | ||
// https://github.com/hiltontj/serde_json_path/issues/49 | ||
#[test] | ||
fn issue_49() { | ||
let value = json!({"a": 1, "b": 2}); | ||
let path = JsonPath::parse("$[?(@.a == 2)]").expect("parses JSONPath"); | ||
assert!(path.query(&value).is_empty()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters