File tree 1 file changed +2
-5
lines changed 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ Its features are:
17
17
* full support for RFC 6902 operations, including ` test ` ;
18
18
* JSON "diff" (RFC 6902 only) with operation factorization.
19
19
20
- The JSON diff implementation is courtesy of [ Randy Watler] ( https://github.com/rwatler ) .
21
-
22
20
## Versions
23
21
24
22
The current version is ** 1.8** . See file ` RELEASE-NOTES.md ` for details.
@@ -113,14 +111,13 @@ final JsonNode patched = patch.apply(orig);
113
111
114
112
### JSON diff
115
113
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:
117
115
118
116
``` java
117
+ final JsonPatch patch = JsonDiff . asJsonPatch(firstNode, secondNode);
119
118
final JsonNode patchNode = JsonDiff . asJson(firstNode, secondNode);
120
119
```
121
120
122
- You can then use the generated ` JsonNode ` to build a patch using the code sample above.
123
-
124
121
### JSON Merge Patch
125
122
126
123
As for ` JsonPatch ` , you may use either Jackson or "direct" initialization:
You can’t perform that action at this time.
0 commit comments