3 ms·
JSON merge ( https://datatracker.ietf.org/doc/html/rfc7386 https://datatracker.ietf.org/doc/html/rfc7386 ) is the entire basis for how I persist document chang
by mathgladiator 4y ago
JSON merge ( https://datatracker.ietf.org/doc/html/rfc7386 https://datatracker.ietf.org/doc/html/rfc7386 ) is the entire basis for how I persist document changes to disk and to clients ( http://www.adama-platform.com/2021/03/28/json.html http://www.adama-platform.com/2021/03/28/json.html ).
Arrays require some care to handle which is why I'm got some extensions in my client, but a super power that JSON patching enables is that it can be algebraic in nature. That it, we can define a patching which is associative (another extension where you preserve nulls) such that (X + da) + db = X + (da + db) = X + dc where da + db + dc
This allows you to leverage flow control when congestion happens (especially on mobile connections).