Now that we have use cases for serialising transactions (auto-save, CollabPad), we should consider a more compact format, David's initial proposal is
[ { type: 'retain', length: 5 }, { type: 'replace', remove: [ 'a' ], insert: [ 'b' ] }, { type: 'retain', length: 3 } ]
->
[ 5, [ [ 'a' ], [ 'b' ] ], 3 ]
There are also attribute and annotate operations to consider. They could be left as is as they are much rarer.