Share via


IObjectAdapter.Replace(Operation, Object) Method

Definition

Using the "replace" operation the value at the target location is replaced with a new value. The operation object MUST contain a "value" member which 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 }

See RFC 6902 https://tools.ietf.org/html/rfc6902#page-6

public:
 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
Public Sub Replace (operation As Operation, objectToApplyTo As Object)

Parameters

operation
Operation

The replace operation.

objectToApplyTo
Object

Object to apply the operation to.

Applies to