Skip to content

Commit b5001af

Browse files
committed
Update README
1 parent 0c1a684 commit b5001af

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff 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

2422
The 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);
119118
final 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

126123
As for `JsonPatch`, you may use either Jackson or "direct" initialization:

0 commit comments

Comments
 (0)