File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ Its features are:
1717* full support for RFC 6902 operations, including ` test ` ;
1818* JSON "diff" (RFC 6902 only) with operation factorization.
1919
20- The JSON diff implementation is courtesy of [ Randy Watler] ( https://github.com/rwatler ) .
21-
2220## Versions
2321
2422The current version is ** 1.8** . See file ` RELEASE-NOTES.md ` for details.
@@ -113,14 +111,13 @@ final JsonNode patched = patch.apply(orig);
113111
114112### JSON diff
115113
116- The main class is ` JsonDiff ` . It returns the patch as a ` JsonNode ` . Sample usage:
114+ The main class is ` JsonDiff ` . It returns the patch as a ` JsonPatch ` or as a ` JsonNode ` . Sample usage:
117115
118116``` java
117+ final JsonPatch patch = JsonDiff . asJsonPatch(firstNode, secondNode);
119118final JsonNode patchNode = JsonDiff . asJson(firstNode, secondNode);
120119```
121120
122- You can then use the generated ` JsonNode ` to build a patch using the code sample above.
123-
124121### JSON Merge Patch
125122
126123As for ` JsonPatch ` , you may use either Jackson or "direct" initialization:
You can’t perform that action at this time.
0 commit comments