assert-json-diff icon indicating copy to clipboard operation
assert-json-diff copied to clipboard

Easily compare two JSON values and get great output

Results 17 assert-json-diff issues
Sort by recently updated
recently updated
newest added

Warnings: ```` cargo clippy Checking assert-json-diff v2.0.1 (/Users/yannsimon/projects/rust/assert-json-diff) warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/diff.rs:65:27 | 65 | rhs: Some(&self.rhs), | ^^^^^^^^^...

When comparing deep json structures, the recursion can be dangerous.

When we already have `Value`, we can avoid using the `Serialize` trait. This allows us: - to avoid the usage of two `panic!` - to have faster code. No need...

It would be really cool if we could configure the assertion to ignore tiny differences in float values, e.g. ``` let assert_config = assert_json_diff::Config::new(assert_json_diff::CompareMode::Strict) .numeric_mode(assert_json_diff::NumericMode::AssumeFloat) .float_eq_epsilon(0.001); assert_json_diff::assert_json_matches!( serde_json::json!({"a": 1.1000001}), serde_json::json!({"a":...

help wanted

In this pull request, we implement a new macro called assert_json_contains. Details and specifications at #8 To reviewers, I ask that we first agree on technical implementation and latter further...

Have a flag to indicate that the order of items in arrays do not matter.

I ran the following test just now, which passed: ```rust assert_json_include!(actual: &serialized, expected: serde_json::json!({ "x": [0], "y": [1, 3], })) ``` Then I changed it to ```rust assert_json_include!(actual: &serialized, expected:...

It would be great if the assertion macros were to support specifying an error message with format parameters as the standard library assertions do. Example: ```rust assert_eq!(1, 2, "Numbers in...

I was wondering if you'd be open to including some kind of flag within the macro that indicates that it should check that the key exists, but ignores the value...

Hello, at first, I would like to very thank you for this library, we used it for our tests and it works perfect. And second, we have one use case:...