4 ms·
Yes, you do. Say you have an object: {x:1} Two people try and add a y:2 to the object. If you treat the object as a string, you can end up with: {y:2,x:1,y:
by josephg 15y ago
Yes, you do.
Say you have an object:
{x:1}
Two people try and add a y:2 to the object. If you treat the object as a string, you can end up with:
{y:2,x:1,y:2}
... which is invalid JSON. If you do string-level operations, there's heaps of ways the JSON can end up invalid or just plain wrong. In comparison, using OT if two people apply a "Insert y:2 into the object" operation, the object will be edited correctly at all sites.