As stated in this article: adding NewtonsoftJson to the application now enables json patch support. I'm wondering how to add NewthonsoftJson without enabling json patch?
As stated in this article: adding NewtonsoftJson to the application now enables json patch support. I'm wondering how to add NewthonsoftJson without enabling json patch?
JsonPatch support is handled through the NewtonsoftJsonPatchInputFormatter type. If you don't want this to be enabled, remove it from the InputFormatters collection. Here's an example:
services.AddControllers()
.AddNewtonsoftJson()
.AddMvcOptions(o => o.InputFormatters.RemoveType<NewtonsoftJsonPatchInputFormatter>());