-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
If using JSON Patch data to compare JSONs A and B as a series of patches, rather than transform A to B, there's additional value in comprehending what value is being replaced or deleted. A "priorValue" would help the client user fully understand each change. For example, this clarifies the change was incrementing the value by 1.
{
"op": "replace",
"path": "/a/b/c",
"priorValue": 41,
"value": 42,
}
It would be appropriate for "replace", "delete", "copy", and "move" operations,
any operation that can change an existing node.
The "priorValue" would be optional, for use in contexts such as comparisons where it's useful.
It's extraneous in ordinary JSON Patches that transform data.
Metadata
Metadata
Assignees
Labels
No labels