v0.5.0
[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, so1,1.0, and1e0are equal. Both a JSONstringand aJsonElementare accepted as the actual value; the expected document is a JSONstring. 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), andIgnoreArrayOrder()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 orJsonElements returns the firstJsonDifference, ornullwhen the documents are equivalent.JsonEquivalenceOptions,JsonDifference, andJsonDifferenceKindare public so the engine is usable outside the assertion path.