com.github.fge.jsonpatch.operation
Interface JsonPatchOperation
- All Superinterfaces:
- JsonSerializable
- All Known Implementing Classes:
- AddOperation, CopyOperation, DualPathOperation, MoveOperation, OmitOperation, OmitOperationBase, OmitOptionalOperation, PathDualValueOperation, PathValueOperation, RemoveOperation, ReplaceOperation, TestOperation, TranslateOperation, TranslateOperationBase, TranslateOptionalOperation
public interface JsonPatchOperation
- extends JsonSerializable
Base abstract class for one patch operation
Two more abstract classes extend this one according to the arguments of
the operation:
DualPathOperation
for operations taking a second pointer as
an argument (copy
and move
);
PathValueOperation
for operations taking a value as an
argument (add
, replace
and test
).
apply
JsonNode apply(JsonNode node)
throws JsonPatchException
- Apply this operation to a JSON value
- Parameters:
node
- the value to patch
- Returns:
- the patched value
- Throws:
JsonPatchException
- operation failed to apply to this value
toString
String toString()
- Overrides:
toString
in class Object