Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

JsonPatchDocument Class

Definition

Namespace:
Microsoft.AspNetCore.JsonPatch
Assembly:
Microsoft.AspNetCore.JsonPatch.dll
Package:
Microsoft.AspNetCore.JsonPatch v1.0.0
Package:
Microsoft.AspNetCore.JsonPatch v1.1.0
Package:
Microsoft.AspNetCore.JsonPatch v10.0.0
Package:
Microsoft.AspNetCore.JsonPatch v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.JsonPatch v2.0.0
Package:
Microsoft.AspNetCore.JsonPatch v2.1.0
Package:
Microsoft.AspNetCore.JsonPatch v2.2.0
Package:
Microsoft.AspNetCore.JsonPatch v3.0.3
Package:
Microsoft.AspNetCore.JsonPatch v3.1.18
Package:
Microsoft.AspNetCore.JsonPatch v5.0.9
Package:
Microsoft.AspNetCore.JsonPatch v6.0.6
Package:
Microsoft.AspNetCore.JsonPatch v7.0.5
Package:
Microsoft.AspNetCore.JsonPatch v8.0.19
Package:
Microsoft.AspNetCore.JsonPatch v9.0.8
Source:
JsonPatchDocument.cs
Source:
JsonPatchDocument.cs
Source:
JsonPatchDocument.cs
Source:
JsonPatchDocument.cs
Source:
JsonPatchDocument.cs
Source:
JsonPatchDocument.cs
Source:
JsonPatchDocument.cs
Source:
JsonPatchDocument.cs
Source:
JsonPatchDocument.cs
Source:
JsonPatchDocument.cs
Source:
JsonPatchDocument.cs

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.

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))]
public class JsonPatchDocument : Microsoft.AspNetCore.Http.Metadata.IEndpointParameterMetadataProvider, Microsoft.AspNetCore.JsonPatch.IJsonPatchDocument
[<Newtonsoft.Json.JsonConverter(typeof(Microsoft.AspNetCore.JsonPatch.Converters.JsonPatchDocumentConverter))>]
type JsonPatchDocument = class
 interface IJsonPatchDocument
[<Newtonsoft.Json.JsonConverter(typeof(Microsoft.AspNetCore.JsonPatch.Converters.JsonPatchDocumentConverter))>]
type JsonPatchDocument = class
 interface IJsonPatchDocument
 interface IEndpointParameterMetadataProvider
Public Class JsonPatchDocument
Implements IJsonPatchDocument
Public Class JsonPatchDocument
Implements IEndpointParameterMetadataProvider, IJsonPatchDocument
Inheritance
JsonPatchDocument
Attributes
Newtonsoft.Json.JsonConverterAttribute
Implements

Constructors

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

Properties

Name Description
ContractResolver
Operations

Methods

Name Description
Add(String, Object)

Add operation. Will result in, for example, { "op": "add", "path": "/a/b/c", "value": [ "foo", "bar" ] }

ApplyTo(Object, Action<JsonPatchError>)

Apply this JsonPatchDocument

ApplyTo(Object, IObjectAdapter, Action<JsonPatchError>)

Apply this JsonPatchDocument

ApplyTo(Object, IObjectAdapter)

Apply this JsonPatchDocument

ApplyTo(Object)

Apply this JsonPatchDocument

Copy(String, String)

Copy the value at specified location to the target location. Will result in, for example: { "op": "copy", "from": "/a/b/c", "path": "/a/b/e" }

Move(String, String)

Removes value at specified location and add it to the target location. Will result in, for example: { "op": "move", "from": "/a/b/c", "path": "/a/b/d" }

Remove(String)

Remove value at target location. Will result in, for example, { "op": "remove", "path": "/a/b/c" }

Replace(String, Object)

Replace value. Will result in, for example, { "op": "replace", "path": "/a/b/c", "value": 42 }

Test(String, Object)

Test value. Will result in, for example, { "op": "test", "path": "/a/b/c", "value": 42 }

Explicit Interface Implementations

Name Description
IEndpointParameterMetadataProvider.PopulateMetadata(ParameterInfo, EndpointBuilder)

Populates metadata for the related Endpoint and ParameterInfo.

IJsonPatchDocument.GetOperations()

Applies to


Feedback

Was this page helpful?