Registry / testing / jsonassert

jsonassert

JSON →
library1.5.3javamavenunverified

Write JSON unit tests in less code, great for testing REST interfaces.

<dependency> <groupId>org.skyscreamer</groupId> <artifactId>jsonassert</artifactId> <version>1.5.3</version> </dependency>
INSTALL
IMPORT
SIG · JSONASSERT
J
jsonassert
testingjavav1.5.3
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.

JSONAssert
org.skyscreamer.jsonassert.JSONAssert

Assert JSON equality with non-strict mode.

import org.skyscreamer.jsonassert.JSONAssert; public class JsonAssertExample { public static void main(String[] args) throws Exception { String expected = "{\"name\":\"John\"}"; String actual = "{\"name\":\"John\",\"age\":30}"; JSONAssert.assertEquals(expected, actual, false); System.out.println("JSONs match (non-strict)"); } }
Debug
Known issues
gotchaJSONAssert's strict mode (true) requires exact field order and no extra fields.
fix
Use false for lenient comparison unless exact match is needed.
affects: *
Upgrade
Version history
1.5.3latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
jsonassert — mvn dependency:get jsonassert · libregistry