Got one to one merging working at the command line with:

python merge.py update_matches.json

It seems like writing a temporary json file might be the easiest way to call this programmatically.