Skip to content

Microsoft.AspNetCore.JsonPatch.JsonPatchDocument should use System.Text.Json as the default JSON formatter #14035

@ebizupnorth

Description

@ebizupnorth

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()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions