i tried two version on two different projects:
- a particle editor which was using the command approach (3), I've ended up with list of following commands (new, delete, copy, deep copy, deep delete and modify property). A few quirks along the way, but it worked. wasn't too hard to make but the editor was quite specific. also, the undo/redo was not persistent and a crash meant that all unsaved data was gone (save early, save often)
- the second project was a generic editor (scene/prefab,etc..) which worked with json data. there I took a more generic way of saving json diff (2). the editor system was basically a local/remote server hosting a mongo database, to which a number of editor front ends could be connected, ie: you could write an editor as a webpage or as full standalone application -using websockets for communication. making the logic to handle json diff took some time, but in the end it magically worked. I managed to write two editor prototypes to try out the system and it was very promising. sadly, due to company changes the projects was halted...
the most pretty part is that you can have a clumsy written editor, which leaks and crashes, but you don't care. the data is always safe, as each change is treated as json delta and inserted into a database automatically. the changes are persistent, logged and tracked. it does require some handling on the editor side, but once the system is up and running adding "new commands" is automatic.