語言

JsonWriterOptions.MaxDepth 屬性

定義

在寫入 JSON 時,會取得或設定最大允許的深度,預設值(即 0)表示最大深度為 1000。

public:
 property int MaxDepth { int get(); void set(int value); };
public int MaxDepth { get; set; }
member this.MaxDepth : int with get, set
Public Property MaxDepth As Integer

屬性值

例外狀況

最大深度設為負值。

備註

超過這個深度會產生 JsonException.

適用於