JsonPatchDocument Class
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.
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 |
|
Properties
| Name | Description |
|---|---|
| ContractResolver | |
| Operations | |
Methods
| Name | Description |
|---|---|
|
Add |
Add value to list at given position |
|
Add |
Add value to the end of the list |
|
Add |
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 |
Copy from a position in a list to a new location in a list |
|
Copy |
Copy from a position in a list to the end of another list |
|
Copy |
Copy from a position in a list to a new location |
|
Copy |
Copy from a property to a location in a list |
|
Copy |
Copy to the end of a list |
|
Copy |
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 |
Move from a position in a list to another location in a list |
|
Move |
Move from a position in a list to the end of another list |
|
Move |
Move from a position in a list to a new location |
|
Move |
Move from a property to a location in a list |
|
Move |
Move to the end of a list |
|
Move |
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 |
Remove value from list at given position |
|
Remove |
Remove value from end of list |
|
Remove |
Remove value at target location. Will result in, for example, { "op": "remove", "path": "/a/b/c" } |
|
Replace |
Replace value in a list at given position |
|
Replace |
Replace value at end of a list |
|
Replace |
Replace value. Will result in, for example, { "op": "replace", "path": "/a/b/c", "value": 42 } |
|
Test |
Test value in a list at given position |
|
Test |
Test value at end of a list |
|
Test |
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 |
Applies JSON patch operations on object and logs errors in ModelStateDictionary. |
|
ApplyTo |
Applies JSON patch operations on object and logs errors in ModelStateDictionary. |