Ray Rahke
05/18/2024, 10:38 AMfoo.bar.baz.x // 5
val copy = foo
foo.bar.baz.x = 7
diff(copy, foo) // { field: .bar.baz.x, before: 5, after: 7 }
Arjan van Wieringen
05/18/2024, 11:02 AMJoffrey
05/18/2024, 3:30 PMdiff
return?
If you want to diff for debug purposes or in a textual form in general, you could consider serializing to JSON and diffing the JSON as text (there are libraries for this AFAIK)Joffrey
05/18/2024, 3:31 PMJacob
05/19/2024, 1:58 AM