gson-diff
gson-diff
is a library that allows diffing of objects with Gson.
Usage
Include this in your POM:
<dependency>
<groupId>com.github.brymck</groupId>
<artifactId>gson-diff</artifactId>
<version>0.10.0</version>
</dependency>
And use it as so, given two instances before
and after
of class Example
:
Gson gson = new Gson();
GsonDiffer gsonDiffer = new GsonDiffer();
DiffResult diffResult = gsonDiffer.diff(
gson,
before,
after
);