public interface JsonMergePatch
This interface represents an implementation of a JSON Merge Patch as defined by RFC 7396.
JsonMergePatch can be instantiated with
by specifying the patch operations in a JSON Merge Patch or using
to create a JSON Merge Patch based on the difference between two
1. Construct a JsonMergePatch with an existing JSON Merge Patch.
2. Construct a JsonMergePatch from a difference between two
JsonValue contacts = ... ; // The target to be patched JsonValue patch = ... ; // JSON Merge Patch JsonMergePatch mergePatch = Json.createMergePatch(patch); JsonValue result = mergePatch.apply(contacts);
JsonValue source = ... ; // The source object JsonValue target = ... ; // The modified object JsonMergePatch mergePatch = Json.createMergeDiff(source, target); // The diff between source and target in a Json Merge Patch format
target. The target is not modified by the patch.
target- the target to apply the merge patch
Copyright © 2012-2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Comments to : [email protected]