Added JSON serialisation/deserialisation to Diff and DiffOp, with tests

Uses Text as the label type for testing; couldn't work out best way to use arbitrary type for that.