Skip to content

Commit 1b04374

Browse files
committed
Announce 1.9
Francis Galiegue (19): Announce 1.8 Diff: Add unchanged path detection New DiffOperation class DiffOperation: no need for the new pointer on .replace() DiffOperation: add ability to generate JsonPatchOperations JsonPatch: make constructor public New class DiffProcessor Add AssertJ dependency JsonDiff: add .asJson(), .asJsonPatch() methods Tests for JsonDiff JsonDiff: javadoc, remove main(), some argument renaming DiffProcessor: factorize additions into copies where possible DiffProcessor: make final DiffProcessor: detect removed values which are added again DiffOperation: arguments rename, add comments JsonDiff: more Javadoc; enforce non null arguments Get rid of the old diff implementation Update README 1.9
1 parent 90d740c commit 1b04374

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Its features are:
1919

2020
## Versions
2121

22-
The current version is **1.8**. See file `RELEASE-NOTES.md` for details.
22+
The current version is **1.9**. See file `RELEASE-NOTES.md` for details.
2323

2424
## Using it in your project
2525

@@ -114,10 +114,15 @@ final JsonNode patched = patch.apply(orig);
114114
The main class is `JsonDiff`. It returns the patch as a `JsonPatch` or as a `JsonNode`. Sample usage:
115115

116116
```java
117-
final JsonPatch patch = JsonDiff.asJsonPatch(firstNode, secondNode);
118-
final JsonNode patchNode = JsonDiff.asJson(firstNode, secondNode);
117+
final JsonPatch patch = JsonDiff.asJsonPatch(source, target);
118+
final JsonNode patchNode = JsonDiff.asJson(source, target);
119119
```
120120

121+
**Important note**: the API offers **no guarantee at all** about patch "reuse";
122+
that is, the generated patch is only guaranteed to safely transform the given
123+
source to the given target. Do not expect it to give the result you expect on
124+
another source/target pair!
125+
121126
### JSON Merge Patch
122127

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

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ apply(plugin: "idea");
4444
apply(plugin: "eclipse");
4545

4646
group = "com.github.fge";
47-
version = "1.9";
47+
version = "1.10-SNAPSHOT";
4848
description = "JSON Patch (RFC 6902) and JSON Merge Patch (RFC 7386) implementation in Java";
4949
sourceCompatibility = "1.6";
5050
targetCompatibility = "1.6"; // defaults to sourceCompatibility

0 commit comments

Comments
 (0)