Skip to content

Commit 06d04d5

Browse files
committed
Update README.md
1 parent 3018ec7 commit 06d04d5

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
JSONassert
22
==========
33

4-
Write JSON unit tests faster and with less code. Great for testing REST interfaces.
4+
Write JSON unit tests in less code. Great for testing REST interfaces.
55

6-
Intro
7-
-----
6+
Summary
7+
-------
88

9-
Write your JSON tests as if you were comparing to a string. JSONassert turns the string into a JSON object and compare the logical structure and data between the two. When _strict_ is set to false (recommended), it forgives reordering data and extending results (as long as all the expected elements are there), making tests less brittle.
9+
Write JSON tests as if you are comparing a string. Under the covers, JSONassert converts your string into a JSON object and compares the logical structure and data with the actual JSON. When _strict_ is set to false (recommended), it forgives reordering data and extending results (as long as all the expected elements are there), making tests less brittle.
10+
11+
Examples
12+
--------
1013

1114
In JSONassert you write and maintain something like this:
1215

@@ -76,6 +79,12 @@ And use JSONAssert.assertEquals just like you'd used Assert.assertEquals in exis
7679
Behind the scenes, JSONAssert, converts your "expected" string to a JSON object, and compares that to the result you want to test. It performs a logical comparison -- much like the don't-do-this example above, but a lot cleaner. On test failure, the result messages are very specific and should simplify troubleshooting.
7780

7881

82+
* * *
83+
84+
Who uses JSONassert?
85+
--------------------
86+
+ [yoga](https://github.com/skyscreamer/yoga) - A relational REST framework
87+
7988
* * *
8089

8190
Resources

0 commit comments

Comments
 (0)