Dela via


MvcCoreMvcBuilderExtensions.AddJsonOptions Method

Definition

Configures JsonOptions for the specified builder. Uses default values from JsonSerializerDefaults.Web.

public static Microsoft.Extensions.DependencyInjection.IMvcBuilder AddJsonOptions (this Microsoft.Extensions.DependencyInjection.IMvcBuilder builder, Action<Microsoft.AspNetCore.Mvc.JsonOptions> configure);
static member AddJsonOptions : Microsoft.Extensions.DependencyInjection.IMvcBuilder * Action<Microsoft.AspNetCore.Mvc.JsonOptions> -> Microsoft.Extensions.DependencyInjection.IMvcBuilder
<Extension()>
Public Function AddJsonOptions (builder As IMvcBuilder, configure As Action(Of JsonOptions)) As IMvcBuilder

Parameters

builder
IMvcBuilder

The IMvcBuilder.

configure
Action<JsonOptions>

An Action to configure the JsonOptions.

Returns

The IMvcBuilder.

Applies to