Computes an RFC 6902 JSON Patch that transforms from into to.
The diff is rooted at the document, so pointers are bare (e.g. /agentStatus,
/items/0). Only add / remove / replace operations are emitted.
When the two documents differ at the root in a way that cannot be expressed
as member-level changes (e.g. an object becomes an array, or a primitive
changes), a single whole-document replace at path "" is returned.
Computes an RFC 6902 JSON Patch that transforms
fromintoto.The diff is rooted at the document, so pointers are bare (e.g.
/agentStatus,/items/0). Onlyadd/remove/replaceoperations are emitted.When the two documents differ at the root in a way that cannot be expressed as member-level changes (e.g. an object becomes an array, or a primitive changes), a single whole-document
replaceat path""is returned.