MvcCoreMvcBuilderExtensions.AddJsonOptions 方法

定义

JsonOptions为指定的 builder进行配置。 使用 中的 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

参数

configure
Action<JsonOptions>

用于配置 JsonOptionsAction

返回

IMvcBuilder

适用于