Semantic JSON diff is not text diff
Object order, array identity, volatile fields, and compatibility turn comparison into a data problem.
August 25, 2026 · 7 minute readWhitespace is the easy part
Parsing removes formatting noise and makes object-key order irrelevant. That gets you structural diff, but not yet semantic comparison.
Arrays need a policy
Comparing by index is correct for ordered events and misleading for entity collections. An identity key lets the engine distinguish a move from a changed object and a new object.
Compatibility is interpretation
An added field is often safe, a removed field may be breaking, and a type change deserves immediate attention. The report should show both the raw change and the policy classification so callers can disagree explicitly.