Microsoft.AspNetCore.JsonPatch 10.0.0-preview.5.25277.114
About
Microsoft.AspNetCore.JsonPatch provides ASP.NET Core support for JSON PATCH requests.
How to Use
To use Microsoft.AspNetCore.JsonPatch, follow these steps:
Installation
dotnet add package Microsoft.AspNetCore.JsonPatch
dotnet add package Microsoft.AspNetCore.Mvc.NewtonsoftJson
Configuration
To enable JSON Patch support, call AddNewtonsoftJson in your ASP.NET Core app's Program.cs:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers()
.AddNewtonsoftJson();
Configure when using System.Text.Json
To add support for JSON Patch using Newtonsoft.Json while continuing to use System.Text.Json for other input and output formatters:
- Update your
Program.cswith logic to construct aNewtonsoftJsonPatchInputFormatter:static NewtonsoftJsonPatchInputFormatter GetJsonPatchInputFormatter() { var builder = new ServiceCollection() .AddLogging() .AddMvc() .AddNewtonsoftJson() .Services.BuildServiceProvider(); return builder .GetRequiredService<IOptions<MvcOptions>>() .Value .InputFormatters .OfType<NewtonsoftJsonPatchInputFormatter>() .First(); } - Configure the input formatter:
var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers(options => { options.InputFormatters.Insert(0, GetJsonPatchInputFormatter()); });
Usage
To define an action method for a JSON Patch in an API controller:
- Annotate it with the
HttpPatchattribute - Accept a
JsonPatchDocument<TModel> - Call
ApplyToon the patch document to apply changes
For example:
[HttpPatch]
public IActionResult JsonPatchWithModelState(
[FromBody] JsonPatchDocument<Customer> patchDoc)
{
if (patchDoc is not null)
{
var customer = CreateCustomer();
patchDoc.ApplyTo(customer, ModelState);
if (!ModelState.IsValid)
{
return BadRequest(ModelState);
}
return new ObjectResult(customer);
}
else
{
return BadRequest(ModelState);
}
}
In a real app, the code would retrieve the data from a store such as a database and update the database after applying the patch.
Additional Documentation
For additional documentation and examples, refer to the official documentation on JSON Patch in ASP.NET Core.
Feedback & Contributing
Microsoft.AspNetCore.JsonPatch is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
Showing the top 20 packages that depend on Microsoft.AspNetCore.JsonPatch.
| Packages | Downloads |
|---|---|
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/36be7ed6d6d56b7da0a2891e3de7ecc2aa48eecd
|
511 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/827b96040e62e5aa47d829bfa61c000d315d4f2e
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/7b22a279ec975335bbb0a7cbadef2e45ee15aa9c
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/cf2c5c9c6dca430b97aa96429b84d0da07eb77f1
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/06b2bc111203f9b9ff0914a7715675a9a66bdac9
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/fbe05294ac5c88be848b4d57d60cb2657874da9b
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/d1fa2cb155ab9226f20b87ab0d7a1eb16b8a8b69
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/88ec3bc3f37e76fbcc932a25f9f0c1c29fe2b343
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/c9e3996173cec136bc2e9f3b4ec45f2a323b1d63
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/e276c8174b8bfdeb70efceafa81c75f8badbc8db
|
8 |
|
Microsoft.AspNetCore.Mvc.Formatters.Json
ASP.NET Core MVC formatters for JSON input and output and for JSON PATCH input using Json.NET.
|
8 |
|
Microsoft.AspNetCore.Mvc.Formatters.Json
ASP.NET Core MVC formatters for JSON input and output and for JSON PATCH input using Json.NET.
This package was built from the source at:
https://github.com/aspnet/Mvc/tree/fb57810f2960730e59db0235207b873c924bc3fd
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/4a42afc5aea63750638e118560d43db04bd9ccc2
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/66de493473521e173fa15ca557f5f97601cedb23
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/c5f85986e62dabfc0b7f2f2a45dc7c22e8ac815f
|
8 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/c967158b960823ccfcb19f1ef56426e2fd38eb3f
|
7 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/aspnet/AspNetCore/tree/2e51a0b6eba74bdf02aee71944e973487937cb99
|
7 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/54e8b61777d42d2b10744d1987438ee5b8c0b24d
|
7 |
|
Microsoft.AspNetCore.Mvc.NewtonsoftJson
ASP.NET Core MVC features that use Newtonsoft.Json. Includes input and output formatters for JSON and JSON PATCH.
This package was built from the source code at https://github.com/dotnet/aspnetcore/tree/f0f9de5692adf1c0576de062f93c6ab7b176433f
|
7 |
.NET Framework 4.6.2
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
.NET 10.0
- Newtonsoft.Json (>= 13.0.3)
.NET Standard 2.0
- Microsoft.CSharp (>= 4.7.0)
- Newtonsoft.Json (>= 13.0.3)
| Version | Downloads | Last updated |
|---|---|---|
| 10.0.1 | 0 | 12/09/2025 |
| 10.0.0 | 0 | 11/11/2025 |
| 10.0.0-rc.2.25502.107 | 1 | 11/04/2025 |
| 10.0.0-rc.1.25451.107 | 2 | 09/16/2025 |
| 10.0.0-preview.7.25380.108 | 3 | 08/14/2025 |
| 10.0.0-preview.6.25358.103 | 3 | 08/14/2025 |
| 10.0.0-preview.5.25277.114 | 3 | 07/11/2025 |
| 10.0.0-preview.4.25258.110 | 5 | 05/23/2025 |
| 10.0.0-preview.3.25172.1 | 5 | 05/24/2025 |
| 10.0.0-preview.2.25164.1 | 6 | 03/24/2025 |
| 10.0.0-preview.1.25120.3 | 6 | 02/26/2025 |
| 9.0.11 | 0 | 11/11/2025 |
| 9.0.10 | 1 | 11/04/2025 |
| 9.0.9 | 2 | 09/16/2025 |
| 9.0.8 | 3 | 08/14/2025 |
| 9.0.7 | 4 | 07/10/2025 |
| 9.0.6 | 4 | 07/10/2025 |
| 9.0.5 | 5 | 05/23/2025 |
| 9.0.4 | 5 | 05/23/2025 |
| 9.0.3 | 6 | 03/24/2025 |
| 9.0.2 | 7 | 02/19/2025 |
| 9.0.1 | 7 | 02/19/2025 |
| 9.0.0 | 7 | 02/19/2025 |
| 9.0.0-rc.2.24474.3 | 5 | 05/23/2025 |
| 9.0.0-rc.1.24452.1 | 5 | 05/23/2025 |
| 9.0.0-preview.7.24406.2 | 7 | 02/19/2025 |
| 9.0.0-preview.6.24328.4 | 5 | 05/24/2025 |
| 9.0.0-preview.5.24306.11 | 5 | 05/24/2025 |
| 9.0.0-preview.4.24267.6 | 7 | 02/19/2025 |
| 9.0.0-preview.3.24172.13 | 6 | 02/26/2025 |
| 9.0.0-preview.2.24128.4 | 8 | 02/19/2025 |
| 9.0.0-preview.1.24081.5 | 5 | 05/24/2025 |
| 8.0.22 | 0 | 11/11/2025 |
| 8.0.21 | 1 | 11/04/2025 |
| 8.0.20 | 2 | 09/17/2025 |
| 8.0.19 | 3 | 08/14/2025 |
| 8.0.18 | 4 | 07/11/2025 |
| 8.0.17 | 4 | 07/11/2025 |
| 8.0.16 | 5 | 05/24/2025 |
| 8.0.15 | 5 | 05/24/2025 |
| 8.0.14 | 6 | 03/24/2025 |
| 8.0.13 | 7 | 02/19/2025 |
| 8.0.12 | 7 | 02/19/2025 |
| 8.0.11 | 7 | 02/19/2025 |
| 8.0.10 | 7 | 02/19/2025 |
| 8.0.8 | 7 | 02/19/2025 |
| 8.0.7 | 7 | 02/19/2025 |
| 8.0.6 | 7 | 02/19/2025 |
| 8.0.5 | 7 | 02/19/2025 |
| 8.0.4 | 7 | 02/19/2025 |
| 8.0.3 | 7 | 02/19/2025 |
| 8.0.2 | 8 | 02/19/2025 |
| 8.0.1 | 7 | 02/19/2025 |
| 8.0.0 | 7 | 02/19/2025 |
| 8.0.0-rc.2.23480.2 | 5 | 05/24/2025 |
| 8.0.0-rc.1.23421.29 | 5 | 05/23/2025 |
| 8.0.0-preview.7.23375.9 | 5 | 05/24/2025 |
| 8.0.0-preview.6.23329.11 | 5 | 05/24/2025 |
| 8.0.0-preview.5.23302.2 | 5 | 05/23/2025 |
| 8.0.0-preview.4.23260.4 | 7 | 02/19/2025 |
| 8.0.0-preview.3.23177.8 | 7 | 02/19/2025 |
| 8.0.0-preview.2.23153.2 | 5 | 05/24/2025 |
| 8.0.0-preview.1.23112.2 | 5 | 05/23/2025 |
| 7.0.20 | 7 | 02/19/2025 |
| 7.0.19 | 7 | 02/19/2025 |
| 7.0.18 | 7 | 02/19/2025 |
| 7.0.17 | 7 | 02/19/2025 |
| 7.0.16 | 7 | 02/19/2025 |
| 7.0.15 | 7 | 02/19/2025 |
| 7.0.14 | 7 | 02/19/2025 |
| 7.0.13 | 7 | 02/19/2025 |
| 7.0.12 | 7 | 02/19/2025 |
| 7.0.11 | 7 | 02/19/2025 |
| 7.0.10 | 7 | 02/19/2025 |
| 7.0.9 | 7 | 02/19/2025 |
| 7.0.8 | 7 | 02/19/2025 |
| 7.0.7 | 7 | 02/19/2025 |
| 7.0.5 | 7 | 02/19/2025 |
| 7.0.4 | 7 | 02/19/2025 |
| 7.0.3 | 7 | 02/19/2025 |
| 7.0.2 | 7 | 02/19/2025 |
| 7.0.1 | 7 | 02/19/2025 |
| 7.0.0 | 8 | 02/19/2025 |
| 7.0.0-rc.2.22476.2 | 5 | 05/24/2025 |
| 7.0.0-rc.1.22427.2 | 5 | 05/23/2025 |
| 7.0.0-preview.7.22376.6 | 5 | 05/24/2025 |
| 7.0.0-preview.6.22330.3 | 5 | 05/23/2025 |
| 7.0.0-preview.5.22303.8 | 5 | 05/24/2025 |
| 7.0.0-preview.4.22251.1 | 7 | 02/19/2025 |
| 7.0.0-preview.3.22178.4 | 5 | 05/24/2025 |
| 7.0.0-preview.2.22153.2 | 5 | 05/23/2025 |
| 7.0.0-preview.1.22109.13 | 7 | 02/19/2025 |
| 6.0.36 | 7 | 02/19/2025 |
| 6.0.35 | 8 | 02/19/2025 |
| 6.0.33 | 7 | 02/19/2025 |
| 6.0.32 | 7 | 02/19/2025 |
| 6.0.31 | 8 | 02/19/2025 |
| 6.0.30 | 7 | 02/19/2025 |
| 6.0.29 | 8 | 02/19/2025 |
| 6.0.28 | 7 | 02/19/2025 |
| 6.0.27 | 7 | 02/19/2025 |
| 6.0.26 | 7 | 02/19/2025 |
| 6.0.25 | 396 | 08/06/2024 |
| 6.0.24 | 7 | 02/19/2025 |
| 6.0.23 | 7 | 02/19/2025 |
| 6.0.22 | 7 | 02/19/2025 |
| 6.0.21 | 6 | 02/19/2025 |
| 6.0.20 | 7 | 02/19/2025 |
| 6.0.19 | 7 | 02/19/2025 |
| 6.0.18 | 7 | 02/19/2025 |
| 6.0.16 | 7 | 02/19/2025 |
| 6.0.15 | 7 | 02/19/2025 |
| 6.0.14 | 7 | 02/19/2025 |
| 6.0.13 | 7 | 02/19/2025 |
| 6.0.12 | 7 | 02/19/2025 |
| 6.0.11 | 7 | 02/19/2025 |
| 6.0.10 | 7 | 02/19/2025 |
| 6.0.9 | 7 | 02/19/2025 |
| 6.0.8 | 8 | 02/19/2025 |
| 6.0.7 | 7 | 02/19/2025 |
| 6.0.6 | 7 | 02/19/2025 |
| 6.0.5 | 8 | 02/19/2025 |
| 6.0.4 | 7 | 02/19/2025 |
| 6.0.3 | 7 | 02/19/2025 |
| 6.0.2 | 8 | 02/19/2025 |
| 6.0.1 | 7 | 02/19/2025 |
| 6.0.0 | 8 | 02/19/2025 |
| 6.0.0-rc.2.21480.10 | 5 | 05/23/2025 |
| 6.0.0-rc.1.21452.15 | 5 | 05/24/2025 |
| 6.0.0-preview.7.21378.6 | 5 | 05/24/2025 |
| 6.0.0-preview.6.21355.2 | 7 | 02/19/2025 |
| 6.0.0-preview.5.21301.17 | 8 | 02/19/2025 |
| 6.0.0-preview.4.21253.5 | 7 | 03/24/2025 |
| 6.0.0-preview.3.21201.13 | 5 | 05/23/2025 |
| 6.0.0-preview.2.21154.6 | 7 | 02/19/2025 |
| 6.0.0-preview.1.21103.6 | 5 | 05/23/2025 |
| 5.0.17 | 7 | 02/19/2025 |
| 5.0.16 | 7 | 02/19/2025 |
| 5.0.15 | 7 | 02/19/2025 |
| 5.0.14 | 7 | 02/19/2025 |
| 5.0.13 | 7 | 02/19/2025 |
| 5.0.12 | 7 | 02/19/2025 |
| 5.0.11 | 7 | 02/19/2025 |
| 5.0.10 | 7 | 02/19/2025 |
| 5.0.9 | 7 | 02/19/2025 |
| 5.0.8 | 7 | 02/19/2025 |
| 5.0.7 | 7 | 02/19/2025 |
| 5.0.6 | 7 | 02/19/2025 |
| 5.0.5 | 7 | 02/19/2025 |
| 5.0.4 | 7 | 02/19/2025 |
| 5.0.3 | 7 | 02/19/2025 |
| 5.0.2 | 7 | 02/19/2025 |
| 5.0.1 | 7 | 02/19/2025 |
| 5.0.0 | 7 | 02/19/2025 |
| 5.0.0-rc.2.20475.17 | 5 | 05/23/2025 |
| 5.0.0-rc.1.20451.17 | 5 | 05/23/2025 |
| 5.0.0-preview.8.20414.8 | 7 | 02/19/2025 |
| 5.0.0-preview.7.20365.19 | 5 | 05/24/2025 |
| 5.0.0-preview.6.20312.15 | 7 | 02/19/2025 |
| 5.0.0-preview.5.20279.2 | 5 | 05/24/2025 |
| 5.0.0-preview.4.20257.10 | 7 | 02/19/2025 |
| 5.0.0-preview.3.20215.14 | 6 | 02/19/2025 |
| 5.0.0-preview.2.20167.3 | 6 | 02/19/2025 |
| 5.0.0-preview.1.20124.5 | 5 | 05/24/2025 |
| 3.1.32 | 7 | 02/19/2025 |
| 3.1.31 | 7 | 02/19/2025 |
| 3.1.30 | 7 | 02/19/2025 |
| 3.1.29 | 8 | 02/19/2025 |
| 3.1.28 | 7 | 02/19/2025 |
| 3.1.27 | 7 | 02/19/2025 |
| 3.1.26 | 7 | 02/19/2025 |
| 3.1.25 | 9 | 02/19/2025 |
| 3.1.24 | 7 | 02/19/2025 |
| 3.1.23 | 7 | 02/19/2025 |
| 3.1.22 | 8 | 02/19/2025 |
| 3.1.21 | 8 | 02/19/2025 |
| 3.1.20 | 7 | 02/19/2025 |
| 3.1.19 | 7 | 02/19/2025 |
| 3.1.18 | 7 | 02/19/2025 |
| 3.1.17 | 7 | 02/19/2025 |
| 3.1.16 | 7 | 02/19/2025 |
| 3.1.15 | 7 | 02/19/2025 |
| 3.1.14 | 7 | 02/19/2025 |
| 3.1.13 | 7 | 02/19/2025 |
| 3.1.12 | 7 | 02/19/2025 |
| 3.1.11 | 7 | 02/19/2025 |
| 3.1.10 | 7 | 02/19/2025 |
| 3.1.9 | 7 | 02/19/2025 |
| 3.1.8 | 7 | 02/19/2025 |
| 3.1.7 | 7 | 02/19/2025 |
| 3.1.6 | 7 | 02/19/2025 |
| 3.1.5 | 7 | 02/19/2025 |
| 3.1.4 | 7 | 02/19/2025 |
| 3.1.3 | 7 | 02/19/2025 |
| 3.1.2 | 7 | 02/19/2025 |
| 3.1.1 | 7 | 02/19/2025 |
| 3.1.0 | 7 | 02/19/2025 |
| 3.1.0-preview3.19555.2 | 7 | 02/19/2025 |
| 3.1.0-preview2.19528.8 | 5 | 05/24/2025 |
| 3.1.0-preview1.19508.20 | 7 | 02/19/2025 |
| 3.0.3 | 7 | 02/19/2025 |
| 3.0.2 | 7 | 02/19/2025 |
| 3.0.0 | 7 | 02/19/2025 |
| 3.0.0-rc1.19457.4 | 6 | 02/19/2025 |
| 3.0.0-preview9.19424.4 | 7 | 02/19/2025 |
| 3.0.0-preview8.19405.7 | 5 | 05/24/2025 |
| 3.0.0-preview7.19365.7 | 5 | 05/24/2025 |
| 3.0.0-preview6.19307.2 | 5 | 05/24/2025 |
| 3.0.0-preview5-19227-01 | 7 | 02/19/2025 |
| 3.0.0-preview4-19216-03 | 7 | 02/19/2025 |
| 3.0.0-preview3-19153-02 | 7 | 02/19/2025 |
| 3.0.0-preview-19075-0444 | 5 | 05/24/2025 |
| 3.0.0-preview-18579-0056 | 5 | 05/24/2025 |
| 2.3.0 | 7 | 02/19/2025 |
| 2.2.0 | 7 | 02/19/2025 |
| 2.2.0-preview3-35497 | 7 | 02/19/2025 |
| 2.2.0-preview2-35157 | 7 | 02/19/2025 |
| 2.2.0-preview1-35029 | 7 | 02/19/2025 |
| 2.1.1 | 7 | 02/19/2025 |
| 2.1.0 | 7 | 02/19/2025 |
| 2.1.0-rc1-final | 7 | 02/19/2025 |
| 2.1.0-preview2-final | 7 | 02/19/2025 |
| 2.1.0-preview1-final | 7 | 02/19/2025 |
| 2.0.0 | 6 | 02/19/2025 |
| 2.0.0-preview2-final | 7 | 02/19/2025 |
| 2.0.0-preview1-final | 7 | 02/19/2025 |
| 1.1.2 | 7 | 02/19/2025 |
| 1.1.1 | 7 | 02/19/2025 |
| 1.1.0 | 7 | 02/19/2025 |
| 1.1.0-preview1-final | 7 | 02/19/2025 |
| 1.0.0 | 7 | 02/19/2025 |
| 1.0.0-rc2-final | 7 | 02/19/2025 |