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 java.lang.Object
- implements JsonSerializable
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BUNDLE
protected static final MessageBundle BUNDLE
op
protected final java.lang.String op
path
protected final JsonPointer path
JsonPatchOperation
protected JsonPatchOperation(java.lang.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 java.lang.String toString()
- Overrides:
toString in class java.lang.Object