News for hackers. Stuff that matters.
Re:Unlocking the Power of JSON Patch by kardos on Friday October 18, 2024 @05:45PM (#41883789)
Indeed it does not seem idempotent. If you move A to B and insert a new A, then rerunning the patch would yield the new A at B.

I suppose a subset of this is idempotent though.

Broadly this seems fraught with peril. It sounds like edge case upon edge case, and only would work in the narrow case where you are 100% sure exactly what the remote document looks like such that you can calculate the patch. If anything gets out of sync, or serialization differs between local and remote, etc youre going to get subtle bugs...

There are no comments on this comment yet.