Skip to content
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

Path is missing the array index #17

Open
BrightSoul opened this issue Nov 9, 2021 · 0 comments
Open

Path is missing the array index #17

BrightSoul opened this issue Nov 9, 2021 · 0 comments

Comments

@BrightSoul
Copy link

Hello there, I'm comparing these two objects:

var obj1 = new Projection
{
    Speakers = new [] { new Speaker { Id = 1, Name = "Fizz" } }
};

var obj2 = new Projection
{
    Speakers = new [] { new Speaker { Id = 1, Name = "Buzz" } }
};

var diffs = AnyDiff.Diff(obj1, obj2);

As you can see, The Name property of the first Speaker in the array has a different value.
The resulting Difference object is omitting the 0 index in the path. It's .Speakers.Name but it should be .Speakers[0].Name.
speakers
Without an index in the Path, I can't really tell which of the objects in the array changed.

Thanks,
Moreno

@BrightSoul BrightSoul changed the title Path is missing array index Path is missing the array index Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant