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.
| Modifier and Type | Field and Description |
|---|---|
static String |
OPERATION_NAME |
BUNDLE, op, path, value| 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, toStringpublic static final String OPERATION_NAME
public ReplaceOperation(JsonPointer path, JsonNode value)
public JsonNode apply(JsonNode node) throws JsonPatchException
JsonPatchOperationnode - the value to patchJsonPatchException - operation failed to apply to this value