I have a method which compares two objects, but I don't know how to compare JsonNode by Jackson library.
I want get something like that:
private boolean test(JsonNode source) {
JsonNode test = compiler.process(file);
return test.equals(source);
}
That's good enough to use JsonNode.equals:
Equality for node objects is defined as full (deep) value equality. This means that it is possible to compare complete JSON trees for equality by comparing equality of root nodes.
Maybe also add a null check as test != null