com.github.fge.jsonpatch
Class JsonPatchOperation
java.lang.Object
com.github.fge.jsonpatch.JsonPatchOperation
- All Implemented Interfaces:
- JsonSerializable
- Direct Known Subclasses:
- DualPathOperation, PathValueOperation, RemoveOperation
public abstract class JsonPatchOperation
- extends Object
- implements JsonSerializable
BUNDLE
protected static final MessageBundle BUNDLE
op
protected final String op
path
protected final JsonPointer path
JsonPatchOperation
protected JsonPatchOperation(String op,
JsonPointer path)
- Constructor
- Parameters:
op
- the operation namepath
- the JSON Pointer for this operation
apply
public abstract 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
public abstract String toString()
- Overrides:
toString
in class Object