Class JsonPatchDocument | Azure SDK for .NET
Michael Gray
Published Feb 17, 2026
Represents a JSON Patch document.
Inheritance
System.Object
JsonPatchDocument
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Core.dll
Syntax
public class JsonPatchDocument Constructors
JsonPatchDocument()
Declaration
public JsonPatchDocument (); JsonPatchDocument(ObjectSerializer)
Declaration
public JsonPatchDocument (Azure.Core.Serialization.ObjectSerializer serializer); Parameters
JsonPatchDocument(ReadOnlyMemory<Byte>)
Declaration
public JsonPatchDocument (ReadOnlyMemory<byte> rawDocument); Parameters
| System.ReadOnlyMemory<System.Byte> rawDocument The binary representation of JSON Patch document. |
JsonPatchDocument(ReadOnlyMemory<Byte>, ObjectSerializer)
Initializes a new instance of JsonPatchDocument using an existing UTF8-encoded JSON Patch document.
Declaration
public JsonPatchDocument (ReadOnlyMemory<byte> rawDocument, Azure.Core.Serialization.ObjectSerializer serializer); Parameters
| System.ReadOnlyMemory<System.Byte> rawDocument The binary representation of JSON Patch document. |
| ObjectSerializer serializer The ObjectSerializer instance to use for value serialization. |
Methods
AppendAdd<T>(String, T)
Declaration
public void AppendAdd<T> (string path, T value); Parameters
| System.String path The path to apply the addition to. |
| value The value to add to the path. |
Type Parameters
AppendAddRaw(String, String)
Initializes a new instance of JsonPatchDocument using an existing UTF8-encoded JSON Patch document.
Declaration
public void AppendAddRaw (string path, string rawJsonValue); Parameters
| System.String path The path to apply the addition to. |
| System.String rawJsonValue The raw JSON value to add to the path. |
AppendCopy(String, String)
Declaration
public void AppendCopy (string from, string path); Parameters
| System.String from The path to copy from. |
| System.String path The path to copy to. |
AppendMove(String, String)
Declaration
public void AppendMove (string from, string path); Parameters
| System.String from The path to move from. |
| System.String path The path to move to. |
AppendRemove(String)
Declaration
public void AppendRemove (string path); Parameters
| System.String path The path to remove. |
AppendReplace<T>(String, T)
Declaration
public void AppendReplace<T> (string path, T value); Parameters
| System.String path The path to replace. |
| value The value to replace with. |
Type Parameters
AppendReplaceRaw(String, String)
Declaration
public void AppendReplaceRaw (string path, string rawJsonValue); Parameters
| System.String path The path to replace. |
| System.String rawJsonValue The raw JSON value to replace with. |
AppendTest<T>(String, T)
Declaration
public void AppendTest<T> (string path, T value); Parameters
| System.String path The path to test. |
| value The value to replace with. |
Type Parameters
AppendTestRaw(String, String)
Declaration
public void AppendTestRaw (string path, string rawJsonValue); Parameters
| System.String path The path to test. |
| System.String rawJsonValue The raw JSON value to test against. |
ToBytes()
Declaration
public ReadOnlyMemory<byte> ToBytes (); Returns
| System.ReadOnlyMemory<System.Byte> The UTF8-encoded JSON. |
ToString()
Declaration
public override string ToString ();