dotnet / dotnet/aspnetcore

Publish Microsoft.AspNetCore.JsonPatch.SystemTextJson without ASP.NET Core Runtime dependency

Open
#65,986 2 comments 0 reactions 0 assignees View on GitHub
area-networking feature-json-patch
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

Hello

We have a use case where we want to use JsonPatch in a Destkop Application.
Example usage:
```csharp
var objectToPatch = new Dto { PropertyToReplace="SomeValue" };
var patchJson = """[{"op": "replace","path": "/PropertyToReplace","value":"ValueToReplace"}]"""
var patch = JsonSerializer.Deserialize>(patchJson);
patch!.ApplyTo(objectToPatch);
```

Implementing this with Microsoft.AspNetCore.JsonPatch.SystemTextJson introduces a runtime dependency to the ASP.NET Core Runtime, which is not and option for us.

Is there a way to publish without ASP.NET Core Runtime dependency or the create a separate nuget package that only has the Core features of JsonPatch?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.