import ddn.data.json5 : json5Diff;
import ddn.var : var;
var a; a["x"] = 1; a["y"] = 2;
var b; b["x"] = 1; b["z"] = 3;
auto ops = json5Diff(a, b);
assert(ops.length != 0);json5Diff
Compute a patch transforming from into to.
The current implementation prioritizes correctness and simplicity:
- Objects are diffed per-key.
- Arrays are replaced as a whole when they differ.