JsonPatchDocument 类

定义

public ref class JsonPatchDocument : Microsoft::AspNetCore::JsonPatch::IJsonPatchDocument
[Newtonsoft.Json.JsonConverter(typeof(Microsoft.AspNetCore.JsonPatch.Converters.JsonPatchDocumentConverter))]
public class JsonPatchDocument : Microsoft.AspNetCore.JsonPatch.IJsonPatchDocument
[<Newtonsoft.Json.JsonConverter(typeof(Microsoft.AspNetCore.JsonPatch.Converters.JsonPatchDocumentConverter))>]
type JsonPatchDocument = class
    interface IJsonPatchDocument
Public Class JsonPatchDocument
Implements IJsonPatchDocument
继承
JsonPatchDocument
属性
Newtonsoft.Json.JsonConverterAttribute
实现

构造函数

JsonPatchDocument()
JsonPatchDocument(List<Operation>, IContractResolver)

属性

ContractResolver
Operations

方法

Add(String, Object)

添加操作。 将生成 ,例如 { “op”: “add”, “path”: “/a/b/c”, “value”: [ “foo”, “bar” ] }

ApplyTo(Object)

应用此 JsonPatchDocument

ApplyTo(Object, Action<JsonPatchError>)

应用此 JsonPatchDocument

ApplyTo(Object, IObjectAdapter)

应用此 JsonPatchDocument

ApplyTo(Object, IObjectAdapter, Action<JsonPatchError>)

应用此 JsonPatchDocument

Copy(String, String)

将指定位置的值复制到目标位置。 将生成 ,例如: { “op”: “copy”, “from”: “/a/b/c”, “path”: “/a/b/e” }

Move(String, String)

删除指定位置的值并将其添加到目标位置。 将生成 ,例如: { “op”: “move”, “from”: “/a/b/c”, “path”: “/a/b/d” }

Remove(String)

删除目标位置的值。 将导致 {“op”: “remove”, “path”: “/a/b/c” }

Replace(String, Object)

替换值。 将生成 ,例如 { “op”: “replace”, “path”: “/a/b/c”, “value”: 42 }

Test(String, Object)

测试值。 将导致 {“op”: “test”, “path”: “/a/b/c”, “value”: 42 }

显式接口实现

IJsonPatchDocument.GetOperations()

适用于