In the general case, there is not enough information in a diff file (in isolation) to be able to give such context - because in the general case there is no guarantee that unchanged entries such as the id will appear in the context lines. Because of that there is unlikely to be a general-purpose module available for this.
In your specific case, maybe it is possible - if the JSON is guaranteed to be short enough that the id and timestamp will always appear in the context lines. In that case, a hand-rolled parser for the diff chunks should be easy to construct and use; you may be able to get a leg-up by finding something that already parses diff files (such as the inline "Patch" class in patch, part of PerlPowerTools), but it may well be overkill for your needs.
In reply to Re: treat diff file in perl
by hv
in thread treat diff file in perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |