Currently it is possible to request html source code of diff, it would be far more useful if diff could be retrieved in a way, that for example JSON parsers can understand.
The HTML diff formatter already does intraline processing but is currently hardcoded in the PHP C-extension to produce HTML directly. We can re-implement this as a DiffFormatter subclass and expose it in the API as one of the diff formats.