ObjectAdapter.Replace(Operation, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The "replace" operation replaces the value at the target location with a new value. The operation object MUST contain a "value" member whose content specifies the replacement value.
The target location MUST exist for the operation to be successful.
For example:
{ "op": "replace", "path": "/a/b/c", "value": 42 }
This operation is functionally identical to a "remove" operation for a value, followed immediately by an "add" operation at the same location with the replacement value.
Note: even though it's the same functionally, we do not call remove + add for performance reasons (multiple checks of same requirements).
public:
virtual void Replace(Microsoft::AspNetCore::JsonPatch::Operations::Operation ^ operation, System::Object ^ objectToApplyTo);
public void Replace (Microsoft.AspNetCore.JsonPatch.Operations.Operation operation, object objectToApplyTo);
abstract member Replace : Microsoft.AspNetCore.JsonPatch.Operations.Operation * obj -> unit
override this.Replace : Microsoft.AspNetCore.JsonPatch.Operations.Operation * obj -> unit
Public Sub Replace (operation As Operation, objectToApplyTo As Object)
Parameters
- operation
- Operation
The replace operation.
- objectToApplyTo
- Object
Object to apply the operation to.