As an API user, I would like to be able to access diffs between revisions of items (or properties, lexemes). Currently, the API only exposes the HTML rendition of these diffs, via the `compare` action:
https://www.wikidata.org/w/api.php?action=help&modules=compare
It would be great to have a JSON representation of these diffs as well. Currently, I can parse the HTML to extract the information I need, but this is brittle as any change in diff rendering could potentially break my consumer.
There is already a task T56328 about this in MediaWiki, but given that there is an even stronger case for this in Wikidata, I am creating a specific ticket for it. This could potentially be implemented by a dedicated API action given the different data format.
I do not have a particular JSON format to propose: anything that is easy to produce by the underlying PHP implementation would be great to have.