Module jakarta.json
Package jakarta.json

Interface JsonPatchBuilder


public interface JsonPatchBuilder
A builder for constructing a JSON Patch as defined by RFC 6902 by adding JSON Patch operations incrementally.

The following illustrates the approach.

   JsonPatchBuilder builder = Json.createPatchBuilder();
   JsonPatch patch = builder.add("/John/phones/office", "1234-567")
                            .remove("/Amy/age")
                            .build();
 
The result is equivalent to the following JSON Patch.
 [
    {"op" = "add", "path" = "/John/phones/office", "value" = "1234-567"},
    {"op" = "remove", "path" = "/Amy/age"}
 ] 
Since:
1.1
See Also: