Skip to main content
A line-based diff reports every reordered key as a change, which buries the differences that matter. A structural diff compares values at each path instead, so reordering is invisible and a genuine change stands out.

Reading the output

Each difference is reported against the path where it occurs:
  • Added: the path exists only in the right document.
  • Removed: the path exists only in the left document.
  • Changed: the path exists in both, with different values.
Array elements are addressed by index, so inserting an element near the start reports every following index as changed.

Where this helps

  • Comparing a webhook payload against the record returned by a lookup
  • Checking what actually changed between two states of a payout or card
  • Reviewing an OpenAPI spec between versions, alongside oasdiff

Diffing in code