Another way to go would be to create a Diff protocol and recursive apply the protocol in it’s implementation.