Table of Contents

AddNewtonsoftJsonFormatters Method

Definition

Namespace
Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json
Assemblies
Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json.dll
Source
src/Codebelt.Extensions.AspNetCore.Mvc.Formatters.Newtonsoft.Json/MvcBuilderExtensions.cs

AddNewtonsoftJsonFormatters(IMvcBuilder, Action<NewtonsoftJsonFormatterOptions>)

Adds the JSON serializer formatters to MVC.

public static IMvcBuilder AddNewtonsoftJsonFormatters(this IMvcBuilder builder, Action<NewtonsoftJsonFormatterOptions> setup = null)

Parameters

builder IMvcBuilder

The IMvcBuilder.

setup Action<NewtonsoftJsonFormatterOptions>

The NewtonsoftJsonFormatterOptions which may be configured.

Returns

IMvcBuilder

A reference to builder after the operation has completed.

Exceptions

ArgumentNullException

builder cannot be null -or- setup cannot be null.