Open
Description
Version: 1.23
Issue: Jsonpatch doesn't handle "/" characters correctly. E.g. when trying to create a patch/diff from an existing dictionary, if there is "/" in a key, it adds/substitutes "~1"
Minimum repro:
import jsonpatch
test_dict = {'/fields/test': '123456'}
patch = jsonpatch.make_patch({}, test_dict)
patch.patch
Expected:
[{'op': 'add', 'path': '/fields/test', 'value': '123456'}]
Actual:
[{'op': 'add', 'path': '/~1fields~1test', 'value': '123456'}]
Metadata
Metadata
Assignees
Labels
No labels