Skip to main content

Module diff

Module diff 

Source
Expand description

Recursive diff of two SLOP trees producing JSON Patch operations.

Paths in generated ops use node IDs for children segments (not array indices), matching the SLOP patch convention.

Functions§

diff_nodes
Recursively diff two trees and return patch operations.
escape_pointer_segment
RFC 6901 JSON Pointer escape for property-key segments. Node ID segments must not contain ‘/’ or ‘~’ and are not escaped.
unescape_pointer_segment
Reverse of escape_pointer_segment.