-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom JSON pointer class #114
Allow custom JSON pointer class #114
Conversation
@stefankoegl is it possible to accept soon? I want to use it in another project and avoid even temporary copy-pasting. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, would you mind adding more tests for custom Pointer which is not extended from python-json-pointer
?
Just for curiosity, can't python-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 |
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? |
Described it in this comment #114 (comment) Hmm, for some reason coverage decreased after I reverted the package version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now. I just merged another pull request, so there's a conflict now. If you can resolve that, I can merge right afterwards.
# Conflicts: # jsonpatch.py # tests.py
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.