Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fslev authored Apr 28, 2024
1 parent 82a6a00 commit 5431745
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ compile 'com.github.fslev:json-compare:<version.from.maven.central>'
### Match any JSON convertible Java objects
JSONCompare will automatically try to convert any given expected or actual Java objects to Jackson JsonNodes and match them.
```javascript
// expected with regex
// expected as String with regex
String expectedString = "{\"a\":1, \"b\": [4, \"ipsum\", \"\\\\d+\"]}";
String actualString = "{\"a\":1, \"b\":[\"ipsum\", 4, 5], \"c\":true}";
JSONCompare.assertMatches(expectedString, actualString); // assertion passes
Expand Down

0 comments on commit 5431745

Please sign in to comment.