Install-Package Marvin.JsonPatch -Version 2.2.0
dotnet add package Marvin.JsonPatch --version 2.2.0
<PackageReference Include="Marvin.JsonPatch" Version="2.2.0" />
paket add Marvin.JsonPatch --version 2.2.0
#r "nuget: Marvin.JsonPatch, 2.2.0"
// Install Marvin.JsonPatch as a Cake Addin #addin nuget:?package=Marvin.JsonPatch&version=2.2.0 // Install Marvin.JsonPatch as a Cake Tool #tool nuget:?package=Marvin.JsonPatch&version=2.2.0
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.
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Marvin.JsonPatch:
Marvin.JsonPatch.Dynamic adds support for dynamically typed objects to Marvin.JsonPatch. Marvin.JsonPatch was built to work on staticly typed objects, which is great for most cases. Yet sometimes you'll want to create a patch document without having a static type to start from (for example: when integrating with a backend that's out of your control), or you'll want to apply a JsonPatchDocument to a dynamic object, or an object that has a property which isn't statically typed. That's what this component takes care of. It extends Marvin.JsonPatch with new methods on JsonPatchDocument, and it allows you to apply the JsonPatchDocument to dynamically typed objects.
A client REST library for .NET with an API that models Angular's ngResource
Streamdata.io official client
A library that allows to create a rfc6902-based JSON Patch Document from comparing two objects.
This package is not used by any popular GitHub repositories.
Release adds multitarget support - supported are net40, net45 and netstandard2.0, meaning the package can now be used on most .NET Framework / .NET Core / .NET platforms.