SystemTextJsonPatch 0.0.8

.NET 6.0
Install-Package SystemTextJsonPatch -Version 0.0.8
dotnet add package SystemTextJsonPatch --version 0.0.8
<PackageReference Include="SystemTextJsonPatch" Version="0.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SystemTextJsonPatch --version 0.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SystemTextJsonPatch, 0.0.8"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install SystemTextJsonPatch as a Cake Addin
#addin nuget:?package=SystemTextJsonPatch&version=0.0.8

// Install SystemTextJsonPatch as a Cake Tool
#tool nuget:?package=SystemTextJsonPatch&version=0.0.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

SystemTextJsonPatchLogo

<a href="https://github.com/Havunen/SystemTextJsonPatch/actions/workflows/ci.yml"> <img src="https://img.shields.io/github/workflow/status/Havunen/SystemTextJsonPatch/CI?logo=GitHub" alt="CI status" /> </a> <a href="https://www.nuget.org/packages/SystemTextJsonPatch#readme-body-tab"> <img src="https://img.shields.io/nuget/v/SystemTextJsonPatch?color=teal&logo=Nuget" alt="Nuget" /> </a>

SystemTextJsonPatch

SystemTextJsonPatch is a JSON Patch (JsonPatchDocument) RFC 6902 implementation for .NET using System.Text.Json

This library tries to ease the migration from Newtonsoft.Json to System.Text.Json by providing similar API for HttpPatch requests as in Microsoft.AspNetCore.JsonPatch and Marvin.JsonPatch

  • Designed as an easy replacement for Microsoft.AspNetCore.JsonPatch
  • Supports .NET 6.0+

Getting started

To enable JsonPatchDocument serialization support add SystemTextJsonPatch.Converters.JsonPatchDocumentConverterFactory to System.Text.Json serialization options converters. This is typically done in startup.cs file when configuring Asp.Net core MVC settings


public void ConfigureServices(IServiceCollection services)
{
    services
        .AddControllers()
        .AddJsonOptions((options) =>
        {
            options.JsonSerializerOptions.Converters.Add(new SystemTextJsonPatch.Converters.JsonPatchDocumentConverterFactory());
        });
}

or when using System.Text.Json.JsonSerializer directly with custom settings.

    var jsonOptions = new JsonSerializerOptions()
    {
        Converters =
        {
            new SystemTextJsonPatch.Converters.JsonPatchDocumentConverterFactory()
        }
    };

    var json = System.Text.Json.JsonSerializer.JsonSerializer.Serialize(incomingOperations, jsonOptions);
Product Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on SystemTextJsonPatch:

Package Downloads
SystemTextJsonPatch.AspNet

SystemTextJsonPatch.AspNet contains JsonOptions extensions for ASP.NET Core

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.8 131 8/11/2022
0.0.7 681 6/17/2022
0.0.6 64 6/17/2022
0.0.5 738 5/24/2022
0.0.4 61 5/24/2022
0.0.3 66 5/23/2022
0.0.2 72 5/23/2022
0.0.1 70 5/19/2022