I'm using guava to compare two JSON files together and have done the following:
ObjectMapper mapper = new ObjectMapper();
TypeReference<HashMap<String, Object>> type =
new TypeReference<HashMap<String, Object>>() {};
Map<String, Object> leftMap = mapper.readValue(leftJson, type);
Map<String, Object> rightMap = mapper.readValue(rightJson, type);
MapDifference<String, Object> difference = Maps.difference(leftMap, rightMap);
System.out.println(difference.entriesDiffering());
Output
package=([{Name=Sarah}], [{Name=Conor}])
Expected output
package=([{Name=Conor}])
Does anyone know how to manipulate the output to just show one side?