I think I used this project when I wrote some custom (hamcrest?) assertion a long while ago.
https://github.com/flipkart-incubator/zjsonpatch
Basically generated a json patch for actual vs expected and displayed it if not empty.
👀 1
c
christophsturm
10/11/2023, 8:43 AM
thanks, also a good inspiration, this seems to use jackson
I’m thinking of writing a lib that can diff any 2 instances of a kotlin or java class and pretty print the difference. probably also a lib that can pretty print any kotlin object.
could then be used by assertion libs like strikt
r
robfletcher
10/11/2023, 4:53 PM
that could be useful. Diffing is actually a pretty thorny subject. There are some nasty corners with things like properties that are unordered collections (e.g.
Set
instances) and especially when you have collections of more complex objects