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/MvcCoreBuilderExtensions.cs

AddNewtonsoftJsonFormatters(IMvcCoreBuilder, Action<NewtonsoftJsonFormatterOptions>)

Adds the JSON serializer formatters to MVC.

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

Parameters

builder IMvcCoreBuilder

The IMvcCoreBuilder.

setup Action<NewtonsoftJsonFormatterOptions>

The NewtonsoftJsonFormatterOptions which may be configured.

Returns

IMvcCoreBuilder

A reference to builder after the operation has completed.

Exceptions

ArgumentNullException

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