Skip to main content

Module diff

Module diff 

Source
Expand description

Structural diff between two JSON values — a port of the TS diff command’s collectDiffEntries / collectRecursiveDiff. Used to surface what normalize_board_model changed relative to the parsed board.yaml.

Rust serializes Option::None fields as null, whereas the TS model is sparse (absent keys are undefined). prune_nulls drops null-valued object entries so both sides diff the same shape the TS CLI does.

Structs§

DiffEntry
One difference at a given path. before/after are omitted from JSON when None.

Enums§

DiffKind
Classifies a single DiffEntry. Serializes lowercase (added/removed/changed).

Functions§

collect_diff_entries
Collect every difference between before and after, sorted by path.
prune_nulls
Recursively remove null-valued object entries (object keys only; array elements are preserved so indices stay stable), mirroring how JS omits undefined object properties.