AddNewtonsoftJsonFormatters Method
Definition
- Namespace
- Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json
- Assemblies
- Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.dll
AddNewtonsoftJsonFormatters(IMvcBuilder, Action<NewtonsoftJsonFormatterOptions>)
Adds the JSON serializer formatters to MVC.
public static IMvcBuilder AddNewtonsoftJsonFormatters(this IMvcBuilder builder, Action<NewtonsoftJsonFormatterOptions> setup = null)
Parameters
builderIMvcBuilderThe IMvcBuilder.
setupAction<NewtonsoftJsonFormatterOptions>The NewtonsoftJsonFormatterOptions which may be configured.
Returns
- IMvcBuilder
A reference to
builderafter the operation has completed.
Exceptions
- ArgumentNullException
buildercannot be null -or-setupcannot be null.