Applying JSON Patches in Python 2.4+ and 3.x