-
Notifications
You must be signed in to change notification settings - Fork 13
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
Filter diff operation by path #9
Comments
Hm, so you want some ability to configure odiff to have special behavior on pre-determined paths? What's the core reason for your use case? Is it that those objects are huge? Or do they have cycles? Something else? I could imagine one might want to do some custom differencing in a similar way. What if we had an API like:
I'd be open to something like this. Thoughts on that? |
To give some context, my use case is quite specific as I am using More generally speaking what I am looking for is for The API you proposed should definitely do the trick. In fact being able to manually provide a diff could enable even more convoluted use cases (ie: you want to send only an ID of an object if it has changes). That said I would suggest to allow the
This would be to simplify the usage of that particular API. UPDATE: I have currently fixed this problem with a smarter logic on my server. That is I compute the partial diff for that sub-object starting from the stored value. |
Ah ok. Well I'm happy to accept a PR with code for your suggestion on top of my suggestion. But it sounds like maybe you don't need it now? |
I came to a point in a project I am developing where I'd need
odiff
to "ignore" an object entirely. ie:The odiff of those might look like:
While I'd need to "ignore" the
ignore
path to produce something like this:I believe that
deep-diff
has aprefilter
option to do that.Is there any way to do that with
odiff
as it is today? Would it make sense instead to attempt a PR to add the "prefilter" thingy?Thanks!
The text was updated successfully, but these errors were encountered: