How do I create a diff of two json objects such that they are in the manual diff format which can be sent to reviewboard? I need to generate the diff from inside a python script.I think manual diffs are generated using the “diff file1 file2” command line utility. Can I generate a similar reviewboard compatible diff using difflib? Or is there another library that I need to use? Thanks!
Share
Use difflib:
In your situation, you compare your json files (I just used dummy text):
Look at the documentation if you need a different output from difflib