-
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
Microsoft.AspNetCore.JsonPatch.JsonPatchDocument should use System.Text.Json as the default JSON formatter #14035
Comments
Thanks for contacting us, @ebizupnorth. |
@eakoning #12994 (comment) has an example of configuring the JsonPatchInputFormatter and the System.Text based formatter. |
(originally from dotnet/AspNetCore.Docs#15332 asked to move here by Rick Anderson) I really appreciate the followup. The key point in #14035 is this:
Which is disappointing. I’m hoping there are coherent plans to move to a full utf-8 string / json stack and avoid much of the transcoding and allocation in the pipeline (see Utf8Json benchmarks). Please reconsider this, as requiring the older package and bringing legacy forward is not moving in the right direction. |
Please consider re-opening this for 3.1. |
@RehanSaeed we won't be changing this in 3.1. Feel free to file a new issue and we can re-evaluate this ask for 5.0 release. |
New issue raised in #16968 |
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
Example: I am trying to use Microsoft.AspNetCore.JsonPatch.JsonPatchDocument but it requires Newtonsoft.Json
Describe the solution you'd like
Since, NET Core is moving away from Newtonsoft.Json dependency as default JSON formatter, it is logical to upgrade JsonPatchDocument. Yes, we can simply add AddNewtonsoftJson() on the service collection instance, but it replaces the default System.Text.Json formatter for all JSON which is very unfortunate and defeat the purpose of moving away from using Newtonsoft.JSON.
Is there any workaround to configure JsonPatchDocument to use Newtonsoft.Json without calling .AddNewtonsftJson()?
The text was updated successfully, but these errors were encountered: