Skip to content

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 14 Jun 12:35
v0.5.0
28ce945

[0.5.0] - 2026-06-14: structural JSON equivalence

Minor release. Adds whole-document structural equivalence assertions. Purely additive.

Added

  • Assert.That(actual).IsEquivalentJsonTo(expected) asserts that two JSON documents carry the same values at the same paths. Equivalence ignores object-property order and the lexical form of numbers, so 1, 1.0, and 1e0 are equal. Both a JSON string and a JsonElement are accepted as the actual value; the expected document is a JSON string. A configure overload sets options: IgnorePath("items[*].timestamp") excludes a path from the comparison (the same path grammar as the other assertions, including the [*] wildcard), and IgnoreArrayOrder() compares arrays as multisets rather than position by position. On failure the message names the first diverging path, the category of difference, and a rendered view of each side, with container values shown as truncated raw JSON.
  • JsonEquivalence (framework-agnostic core) exposes the comparison directly: Compare(expected, actual, options) over JSON strings or JsonElements returns the first JsonDifference, or null when the documents are equivalent. JsonEquivalenceOptions, JsonDifference, and JsonDifferenceKind are public so the engine is usable outside the assertion path.