Support for JSON Merge Patch (RFC 7386) #35237
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
feature-json-patch
Milestone
Is your feature request related to a problem? Please describe.
Implementing JSON Merge Patch manually can be quite tricky but provides a simpler experience for API consumers.
Describe the solution you'd like
Currently there is built-in support for JSON Patch (RFC 6902) via JsonPatchDocument. Would love to also see an implementation of RFC 7386.
So no one has to wade through an RFC...
Given the following JSON representation:
These two will produce equivalent modifications:
JSON Patch
JSON Merge Patch
Additional context
OData has an implementation of this spec via Delta but it was not designed to work with formatters other than OData.
Here are a couple of open-source implementations:
https://www.strathweb.com/2013/01/easy-asp-net-web-api-resource-updates-with-delta/
https://github.com/Morcatko/Morcatko.AspNetCore.JsonMergePatch
The text was updated successfully, but these errors were encountered: