JSON-Patch icon indicating copy to clipboard operation
JSON-Patch copied to clipboard

Add user-defined hooks into the deepClone function

Open udbhav-s opened this issue 4 years ago • 0 comments

I'm using fast-json-patch with an object where I need to remove some private properties on the server before generating the patch and sending it to the client - adding a hook for the clone function would allow people to transform the object before patches are generated, which would remove the need for redundantly deep cloning the object and then passing it into jsonpatch. Users could also use this hook to handle edge cases like Dates and other objects which cannot be directly converted into JSON.

udbhav-s avatar Sep 01 '21 10:09 udbhav-s