# lukas-krecan/JsonUnit

Compare JSON in your Unit Tests

Repository: https://github.com/lukas-krecan/JsonUnit
Canonical: https://ross.abutalabs.com/products/jsonunit
Language: Java
License: Apache-2.0
License Family: permissive
Last push: 2026-09-03T02:05:35+00:00

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 35, longevity 100
- inputs: {"age_days": 5330, "days_push": 0, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1004, forks 117 (observed 2026-09-03T02:15:14.585032+00:00)

## What it is
JsonUnit is a Java library that simplifies JSON comparison in unit tests. It provides integrations with AssertJ, Hamcrest, Kotest, and Spring testing frameworks, with features like JsonPath support, value ignoring, and regex matching.

## Use cases
- compare JSON in unit tests
- assert JSON responses in Spring MVC tests
- ignore fields when comparing JSON
- match JSON with JsonPath expressions
- compare JSON ignoring array order
- assert JSON structure with type placeholders
- test REST API JSON payloads

## When to choose
- writing JVM unit tests that assert JSON output
- testing Spring REST endpoints with JSON responses
- you need lenient JSON comparison with ignored values or paths
- you want AssertJ or Hamcrest style JSON assertions

## When to avoid
- you need to diff JSON files outside of tests
- your project is not on the JVM
- you need JSON schema validation rather than comparison

## Facets
- artifact type: library
- maturity: active
- function: testing, json, serialization
- domain: testing, developer-tools, web-development
- platform: jvm
- tags: json-comparison, assertj, hamcrest, spring-testing, jsonpath, unit-testing

## Member repositories
- lukas-krecan/JsonUnit (main) score 77

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:14.585032+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:13:45.705223+00:00, confidence not recorded.
  - readme: https://github.com/lukas-krecan/JsonUnit (fetched 2026-09-03T02:15:14.585032+00:00, sha 17dac256f83f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
