Speaking of reflections. Anybody knows if there is...
# announcements
m
Speaking of reflections. Anybody knows if there is a library for diffing data class objects?
t
I once wrote an apt tool that would map an object out to Map<String,String> so that I could diff and only make api calls with what changed. what would you expect the output to be for such a comparison
m
I have a deep structure of data classes and want to know which parts of the structure changed. So the output of diff on two objects of the same data class would be a list I can iterate over with objects like this:
Diff("someList.size", 0, 3)
// when some prop list size changed or
Diff("otherList[2].name", "old", "new")
// when element at position 2 has it's name property changed
Maybe strings there could be replaced with something better.