On Aug 29, 2011, at 10:48 PM, gaoyong pan wrote:

> Do you have an example code that shows the json diff algorithm, what
> will the diff document looks like?

Representing documents as [branching] lists of sequential diffs gets into 
really complex areas like Operational Transforms[1] and Patch Theory[2]. Which 
are quite fascinating, and necessary if you want to implement a version control 
system or Google Wave, but orders of magnitude harder to implement than simply 
merging together two conflicting versions of a document according to your 
application schema.

—Jens

[1] http://en.wikipedia.org/wiki/Operational_transform
[2] http://en.wikibooks.org/wiki/Understanding_Darcs/Patch_theory

Reply via email to