Interface Operation<P>
- Type Parameters:
P- the node type of the model of the patch document
- All Known Implementing Classes:
Operation.Add, Operation.Copy, Operation.Move, Operation.Remove, Operation.Replace, Operation.Test
public sealed interface Operation<P>
permits Operation.Add<P>, Operation.Remove<P>, Operation.Replace<P>, Operation.Move<P>, Operation.Copy<P>, Operation.Test<P>
An operation of a JSON Patch (RFC 6902, Section 4).
A value of an operation is a node of the patch document, in the model of the patch document
(P). The patch does not copy it when it reads the document. JsonPatch.apply(N, M) copies it once
into the target document.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordadd(Section 4.1): adds a member, inserts an array element, or replaces the whole document.static final recordcopy(Section 4.5): adds a copy of the value atfromat the target location.static final recordmove(Section 4.4): removes the value atfromand adds it at the target location.static final recordremove(Section 4.2): removes the value at the target location.static final recordreplace(Section 4.3): replaces the value at the target location.static final recordtest(Section 4.6): tests that the value at the target location is equal to a value. -
Method Summary
-
Method Details
-
path
JsonPointer path()The target location of the operation: thepathmember.- Returns:
- the pointer to the target location
-