0
Under review

nested compare

MBR 4 years ago updated by Omer Raviv (CTO) 4 years ago 1

I had need of Comparison today, but it seems like it's just comparing the ToString() of each field rather than what I expected, which would be a nested compare of sub-objects as I expanded each. Comparing the ToString isn't as useful, as this is something I could eye-ball.


If you can't do the nested version right away, you should at least have the option of doing a formatted JsonConvert.SerializeObject on each field and use that as the target string for comparison.

Under review

Hi there!


Thank you very much for the feedback, it is much appreciated!


The main benefit of OzCode's Compare is that it does in fact compare nested sub-objects throughout your entire object graph, but there is a UX issue that we are still working to solve, where the "+" expanders do not appear, which makes the experience non-obvious. In order to find differences deeper inside the object graph, you must first click "Show differences only", which will search for differences 3 levels down the object graph, and then click "Search deeper", which will expand the search 2 levels deeper each time you press it. Yes, we realize this UX can be very confusing, and we are working to solve it in a future update. Note that you can change the default depth via OzCode->Options.


As for the 2nd option you asked for, that's already implemented in the OzCode v2.1 beta, please see the announcement blog post. You can now Export an object to Json, and get the results of JsonConvert.SerializeObject with one click. You can also save those results to a file, which allows you to use your favorite diff tool to compare the export output of different variables.


Thanks again.