Closed guillp closed 6 years ago
Please consider the following test case:
from jsonpatch import JsonPatch obj = {'attribute': 'value'} patch = JsonPatch([{'op': 'add', 'path': '/attribute/4', 'value': 'foo'}]) patch.apply(obj)
This raises a TypeError: invalid document type <class 'str'>. With the proposed pull request, it returns a JsonPatchConflict: unable to fully resolve json pointer /attribute/4, part 4
TypeError: invalid document type <class 'str'>
JsonPatchConflict: unable to fully resolve json pointer /attribute/4, part 4
Looks good, thanks :)
Please consider the following test case:
This raises a
TypeError: invalid document type <class 'str'>
. With the proposed pull request, it returns aJsonPatchConflict: unable to fully resolve json pointer /attribute/4, part 4