public final class ReplaceOperation extends PathValueOperation
replace
operation
For this operation, path
points to the value to replace, and
value
is the replacement value.
It is an error condition if path
does not point to an actual JSON
value.
value
BUNDLE, op, path
Constructor and Description |
---|
ReplaceOperation(JsonPointer path,
JsonNode value) |
Modifier and Type | Method and Description |
---|---|
JsonNode |
apply(JsonNode node)
Apply this operation to a JSON value
|
serialize, serializeWithType, toString
public ReplaceOperation(JsonPointer path, JsonNode value)
public JsonNode apply(JsonNode node) throws JsonPatchException
JsonPatchOperation
apply
in class JsonPatchOperation
node
- the value to patchJsonPatchException
- operation failed to apply to this value