Table of Contents

AddNewtonsoftJsonFormatterOptions Method

Definition

AddNewtonsoftJsonFormatterOptions(IServiceCollection, Action<NewtonsoftJsonFormatterOptions>)

Adds configuration of NewtonsoftJsonFormatterOptions for the application.

public static IServiceCollection AddNewtonsoftJsonFormatterOptions(this IServiceCollection services, Action<NewtonsoftJsonFormatterOptions> setup = null)

Parameters

services IServiceCollection

The IServiceCollection to extend.

setup Action<NewtonsoftJsonFormatterOptions>

The NewtonsoftJsonFormatterOptions which may be configured.

Returns

IServiceCollection

A reference to services so that additional configuration calls can be chained.

Exceptions

ArgumentNullException

services cannot be null.

ArgumentException

setup failed to configure an instance of NewtonsoftJsonFormatterOptions in a valid state.