共用方式為


MvcCoreMvcBuilderExtensions.AddJsonOptions 方法

定義

為指定的 builder 設定 JsonOptions 。 使用 來自 的 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

適用於