Skip to content

JsonDocumentOptions.MaxDepth Property

Definition

Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: JsonDocumentOptions.cs

MaxDepth()

Gets or sets the maximum depth allowed when reading JSON, with the default (i.e. 0) indicating a max depth of 64.

public int MaxDepth { get; set; }

Returns

int

Exceptions

Exception Description
ArgumentOutOfRangeException Thrown when the max depth is set to a negative value.

Remarks

Reading past this depth will throw a JsonException.

Applies To

Product Versions
.NET 9, 10
.NET Standard 2.0, 2.1

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests.

Open an issue