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