Skip to content

Commit 1ec7724

Browse files
committed
Bump to version 1.1.0
1 parent c3ff361 commit 1ec7724

File tree

4 files changed

+23
-25
lines changed

4 files changed

+23
-25
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/
66

77
## Unreleased
88

9-
- All methods now accept any `T: Serialize` rather than just `serde_json::Value`.
9+
None.
1010

1111
### Breaking changes
1212

1313
None.
1414

15+
## [1.1.0] - 2020-07-12
16+
17+
- All methods now accept any `T: Serialize` rather than just `serde_json::Value`.
18+
1519
## [1.0.3] - 2020-02-21
1620

1721
- Introduce non-panicking functions with `assert_json_include_no_panic` and `assert_json_eq_no_panic`.
@@ -50,6 +54,7 @@ None.
5054

5155
Initial release.
5256

57+
[1.1.0]: https://github.com/davidpdrsn/assert-json-diff/compare/v1.0.3...1.1.0
5358
[1.0.3]: https://github.com/davidpdrsn/assert-json-diff/compare/v1.0.2...1.0.3
5459
[1.0.2]: https://github.com/davidpdrsn/assert-json-diff/compare/v1.0.1...1.0.2
5560
[1.0.1]: https://github.com/davidpdrsn/assert-json-diff/compare/v1.0.0...1.0.1

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
version = "1.0.3" # remember to update html_root_url
2+
version = "1.1.0" # remember to update html_root_url
33
authors = ["David Pedersen <david.pdrsn@gmail.com>"]
44
categories = ["development-tools"]
55
description = "Easily compare two JSON values and get great output"

README.md

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
# assert-json-diff
44

5-
This crate includes macros for comparing two JSON values. It is designed to give much
6-
more helpful error messages than the standard [`assert_eq!`]. It basically does a diff of the
7-
two objects and tells you the exact differences. This is useful when asserting that two large
8-
JSON objects are the same.
5+
This crate includes macros for comparing two serializable values by diffing their JSON
6+
representations. It is designed to give much more helpful error messages than the standard
7+
[`assert_eq!`]. It basically does a diff of the two objects and tells you the exact
8+
differences. This is useful when asserting that two large JSON objects are the same.
99

10-
It uses the [`serde_json::Value`] type to represent JSON.
10+
It uses the [serde] and [serde_json] to perform the serialization.
1111

12-
[`serde_json::Value`]: https://docs.serde.rs/serde_json/value/enum.Value.html
12+
[serde]: https://crates.io/crates/serde
13+
[serde_json]: https://crates.io/crates/serde_json
1314
[`assert_eq!`]: https://doc.rust-lang.org/std/macro.assert_eq.html
1415

1516
### Partial matching
@@ -18,10 +19,8 @@ If you want to assert that one JSON value is "included" in another use
1819
[`assert_json_include`](macro.assert_json_include.html):
1920

2021
```rust
21-
#[macro_use]
22-
extern crate assert_json_diff;
23-
#[macro_use]
24-
extern crate serde_json;
22+
use assert_json_diff::assert_json_include;
23+
use serde_json::json;
2524

2625
fn main() {
2726
let a = json!({
@@ -86,10 +85,8 @@ json atoms at path ".data.users[1].id" are not equal:
8685
of the JSON without having to specify the whole thing. For example this test passes:
8786

8887
```rust
89-
#[macro_use]
90-
extern crate assert_json_diff;
91-
#[macro_use]
92-
extern crate serde_json;
88+
use assert_json_diff::assert_json_include;
89+
use serde_json::json;
9390

9491
fn main() {
9592
assert_json_include!(
@@ -106,10 +103,8 @@ fn main() {
106103
However `expected` cannot contain additional data so this test fails:
107104

108105
```rust
109-
#[macro_use]
110-
extern crate assert_json_diff;
111-
#[macro_use]
112-
extern crate serde_json;
106+
use assert_json_diff::assert_json_include;
107+
use serde_json::json;
113108

114109
fn main() {
115110
assert_json_include!(
@@ -134,10 +129,8 @@ json atom at path ".a.b" is missing from actual
134129
If you want to ensure two JSON values are *exactly* the same, use [`assert_json_eq`](macro.assert_json_eq.html).
135130

136131
```rust
137-
#[macro_use]
138-
extern crate assert_json_diff;
139-
#[macro_use]
140-
extern crate serde_json;
132+
use assert_json_diff::assert_json_eq;
133+
use serde_json::json;
141134

142135
fn main() {
143136
assert_json_eq!(

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@
155155
unused_qualifications,
156156
unknown_lints
157157
)]
158-
#![doc(html_root_url = "https://docs.rs/assert-json-diff/1.0.3")]
158+
#![doc(html_root_url = "https://docs.rs/assert-json-diff/1.1.0")]
159159

160160
use diff::{diff, Mode};
161161
use serde::Serialize;

0 commit comments

Comments
 (0)