Closed tzoiker closed 3 years ago
@stefankoegl is it possible to accept soon? I want to use it in another project and avoid even temporary copy-pasting.
LGTM, would you mind adding more tests for custom Pointer which is not extended from
python-json-pointer
? Just for curiosity, can'tpython-json-pointer
meet your current requirment?
Added a toy example. The idea was to at least be able to extend (or replace with the same, but custom implementation in C or whatever). In my particular case, I wanted to add an extension (out of spec, obviously) that allows to dynamically match array indexes based on the nested values of array elements (something like /@foo="bar"/val
instead of /1/val
for [{"foo": "baz", "val": 0}, {"foo": "bar", "val": 1}}]
).
Nice work! it will make this lib more flexiable.
@tzoiker, looks good. Please revert the change of version number - that will be done when a new release is prepared.
Could you please also briefly describe your use case?
@tzoiker, looks good. Please revert the change of version number - that will be done when a new release is prepared.
Could you please also briefly describe your use case?
Described it in this comment https://github.com/stefankoegl/python-json-patch/pull/114#issuecomment-728773802
Hmm, for some reason coverage decreased after I reverted the package version.
I have just released v1.27 which inlcudes this PR. Thanks for the contribution!
@stefankoegl It would be nice to be able to pass a custom implementation of the JSON pointer.