Skip to content

Revisions differences #12166

Answered by ayende
djordjedjukic asked this question in Q&A
Discussion options

You must be logged in to vote

There is no API for that. The Studio is able to do that, but it is doing this inline. By fetching the two revisions and comparing their texts.

I would recommend that you take the same approach here. Just fetch the two documents, output their json with formatting enabled and then use any text diff tooling.

Alternatively, you can get the two revisions and pass them to a library that would compare them.
An example of such a library is here:
https://github.com/GregFinzer/Compare-Net-Objects

That is just the first I found, no idea about its quality.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ayende
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants