I’m requesting the diffs for a certain commit. I get the response in JSON and read the diff field. But I don’t understand the format of the diff. Whatever library or tool I try, none is able to parse it (e.g. GitHub - rtfpessoa/diff2html: Pretty diff to html javascript library (diff2html) or GitHub - thombergs/diffparser: Parse unified diffs with Java.). The format doesn’t seem to be “unified diff” and while it looks similar it’s missing key components.
Getting informaton about diff formats isn’t easy. Is yours specified somewhere, does it have a name?
I saw Compare two commits using gitlab api and get response in `.diff` format but the problem isn’t really with the response being in JSON but with the “diff” field itself.