JsonReaderOptions.MaxDepth 屬性

定義

取得或設定讀取 JSON 時允許的最大深度,預設值 (亦即 0) 表示最大深度為 64。

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

屬性值

Int32

讀取 JSON 時允許的最大深度。

例外狀況

最大深度將設定為負值。

備註

讀取超過這個深度就會擲回 JsonException

適用於