Info
Version: | 2.2.1 |
Author(s): | Kevin Dockx (Marvin) |
Last Update: | Wednesday, April 6, 2022 |
.NET Fiddle: | Online Example |
Project Url: | https://github.com/KevinDockx/JsonPatch |
NuGet Url: | https://www.nuget.org/packages/Marvin.JsonPatch |
Install
Install-Package Marvin.JsonPatch
dotnet add package Marvin.JsonPatch
paket add Marvin.JsonPatch
Marvin.JsonPatch Download (Unzip the "nupkg" after downloading)
Dependencies
- Newtonsoft.Json(>= 9.0.1)
Tags
The "application/json-patch+json" media type is used to identify such patch documents.
One of the things this can be used for is partial updates for REST-ful API's, or, to quote the IETF: "This format is also potentially useful in other cases in which it is necessary to make partial updates to a JSON document or to a data structure that has similar constraints (i.e., they can be serialized as an object or an array using the JSON grammar)."
That's what this package is all about. Web API supports the HttpPatch method, but there's currently no implementation of the JsonPatchDocument in .NET, making it hard to pass in a set of changes that have to be applied - especially if you're working cross-platform and standardization of your API is essential.
Have a look at the project site for the current status of this package and to learn how to get started.