-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Any chance to get better nested diff information? #36
Comments
Seems like I can use following JsonDiffOptions to control array-comparison:
Looks promising, the following works as expected (I've changed bar1 to ID since this would be my real-world example, if for any reason the ID is missing I'm falling back with ArrayObjectItemMatchByPosition=true):
|
Did I miss out any documentation about this? |
Yes works this way:
|
I think you've pretty much found the way. If you have a look at the
By default if the two objects are not deeply equal to each other, then they are considered totally not equal and therefore the There probably should be some Wiki documentation about array diffs.
I agree. The reason for it being a private is because the implementation of the class is actually a combination of partial JSON Pointer and a pointer scope at the moment. The JSON Pointer implementation should ideally be a public type. I did not want to expose this type until it is properly refactored otherwise it might be hard to change the implementation. |
With the following code (excluded the usings for simplicity)
I'm getting follwing:
I would like to get something like:
I've looked into DefaultFormatter and it seems that JsonDiffDelta has already 2 change entries: one for remove and one for add.
What's the best method to check arrays recursively (the way I want)? Is there some kind of flag or would I need to override FormatArray somehow?
Thanks!
The text was updated successfully, but these errors were encountered: