Registry / testing / json-unit-assertj

json-unit-assertj

JSON →
library5.1.1javamavenunverified

Provides AssertJ-based fluent assertions for comparing JSON strings and structures in Java tests.

<dependency> <groupId>net.javacrumbs.json-unit</groupId> <artifactId>json-unit-assertj</artifactId> <version>5.1.1</version> </dependency>
INSTALL
IMPORT
SIG · JSON-UNIT-ASSERTJ
J
json-unit-assertj
testingjavav5.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

JsonAssertions
net.javacrumbs.jsonunit.assertj.JsonAssertions

Assert that two JSON strings are equal using AssertJ-style assertions.

import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson; String actual = "{\"name\":\"John\"}"; String expected = "{\"name\":\"John\"}"; assertThatJson(actual).isEqualTo(expected);
Debug
Known issues
breakingVersion 5.x uses AssertJ 3.x; if your project uses AssertJ 2.x, you may encounter compatibility issues.
fix
Upgrade to AssertJ 3.x or use json-unit-assertj 2.x for AssertJ 2.x compatibility.
affects: >=5.0.0
Upgrade
Version history
5.1.1latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
4
Amazon
1
Bingbot
1
Resources
json-unit-assertj — mvn dependency:get json-unit-assertj · libregistry