Language

JsonPatchDocument Class

Definition

generic 
 where TModel : classpublic ref class JsonPatchDocument : Microsoft::AspNetCore::JsonPatch::IJsonPatchDocument
[Newtonsoft.Json.JsonConverter(typeof(Microsoft.AspNetCore.JsonPatch.Converters.TypedJsonPatchDocumentConverter))]
public class JsonPatchDocument : Microsoft.AspNetCore.JsonPatch.IJsonPatchDocument where TModel : class
[Newtonsoft.Json.JsonConverter(typeof(Microsoft.AspNetCore.JsonPatch.Converters.TypedJsonPatchDocumentConverter))]
public class JsonPatchDocument : Microsoft.AspNetCore.Http.Metadata.IEndpointParameterMetadataProvider, Microsoft.AspNetCore.JsonPatch.IJsonPatchDocument where TModel : class
[]
type JsonPatchDocument<'Model (requires 'Model : null)> = class
    interface IJsonPatchDocument
[]
type JsonPatchDocument<'Model (requires 'Model : null)> = class
    interface IJsonPatchDocument
    interface IEndpointParameterMetadataProvider
Public Class JsonPatchDocument(Of TModel)
Implements IJsonPatchDocument
Public Class JsonPatchDocument(Of TModel)
Implements IEndpointParameterMetadataProvider, IJsonPatchDocument

Type Parameters

TModel
Inheritance
JsonPatchDocument
Attributes
Newtonsoft.Json.JsonConverterAttribute
Implements

Constructors

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

Properties

Name Description
ContractResolver
Operations

Methods

Name Description
Add(Expression>>, TProp, Int32)

Add value to list at given position

Add(Expression>>, TProp)

Add value to the end of the list

Add(Expression>, TProp)

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

ApplyTo(TModel, Action)

Apply this JsonPatchDocument

ApplyTo(TModel, IObjectAdapter, Action)

Apply this JsonPatchDocument

ApplyTo(TModel, IObjectAdapter)

Apply this JsonPatchDocument

ApplyTo(TModel)

Apply this JsonPatchDocument

Copy(Expression>>, Int32, Expression>>, Int32)

Copy from a position in a list to a new location in a list

Copy(Expression>>, Int32, Expression>>)

Copy from a position in a list to the end of another list

Copy(Expression>>, Int32, Expression>)

Copy from a position in a list to a new location

Copy(Expression>, Expression>>, Int32)

Copy from a property to a location in a list

Copy(Expression>, Expression>>)

Copy to the end of a list

Copy(Expression>, Expression>)

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(Expression>>, Int32, Expression>>, Int32)

Move from a position in a list to another location in a list

Move(Expression>>, Int32, Expression>>)

Move from a position in a list to the end of another list

Move(Expression>>, Int32, Expression>)

Move from a position in a list to a new location

Move(Expression>, Expression>>, Int32)

Move from a property to a location in a list

Move(Expression>, Expression>>)

Move to the end of a list

Move(Expression>, Expression>)

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(Expression>>, Int32)

Remove value from list at given position

Remove(Expression>>)

Remove value from end of list

Remove(Expression>)

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

Replace(Expression>>, TProp, Int32)

Replace value in a list at given position

Replace(Expression>>, TProp)

Replace value at end of a list

Replace(Expression>, TProp)

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

Test(Expression>>, TProp, Int32)

Test value in a list at given position

Test(Expression>>, TProp)

Test value at end of a list

Test(Expression>, TProp)

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()

Extension Methods

Name Description
ApplyTo(JsonPatchDocument, T, ModelStateDictionary, String)

Applies JSON patch operations on object and logs errors in ModelStateDictionary.

ApplyTo(JsonPatchDocument, T, ModelStateDictionary)

Applies JSON patch operations on object and logs errors in ModelStateDictionary.

Applies to