public static JsonPatch generate ( final JsonNode source , final JsonNode target , ReplaceMode replaceMode ) { requireNonNull ( source , "source" ) ; requireNonNull ( target , "target" ) ; final DiffProcessor processor = new DiffProcessor ( replaceMode , ( ) -> unchangedValues ( source , target ) ) ; generateDiffs ( processor , EMPTY_JSON_POINTER , source , target ) ; return processor . getPatch ( ) ; }
Generates a JSON patch for transforming the source node into the target node .