-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSonPatch doesn't work #22216
Comments
JsonPatch requires using Newtonsoft.Json in the app. https://docs.microsoft.com/en-us/aspnet/core/web-api/jsonpatch has some suggestions on configuring the application to use |
This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes. See our Issue Management Policies for more information. |
@pranavkm is the second method still working ?
but when i use this
json patch is deserialized as null. i did a quick repo to reproduce: https://github.com/erwan-joly/jsonpatchbugexample/blob/master/JSonPatchExample/Program.cs#L58 |
The media type in your application isn't configured correctly: https://github.com/erwan-joly/jsonpatchbugexample/blob/master/JSonPatchExample/Program.cs#L77. It needs to be |
Thanks @pranavkm it definitely was the issue. |
Describe the bug
When trying to use a JsonPatchDocument i get error trying to deserialize an interface.
https://github.com/dotnet/aspnetcore/blob/master/src/Features/JsonPatch/src/JsonPatchDocument.cs#L24
https://github.com/dotnet/aspnetcore/blob/master/src/Features/JsonPatch/src/JsonPatchDocumentOfT.cs
This seems to be because it's still using Newtonsoft instead of the new JSon.Net
my understanding is that it should be
To Reproduce
This will error on binding.
Further technical details
The text was updated successfully, but these errors were encountered: