<PackageReference Include="System.Text.Json" Version="6.0.10" />

JsonDocumentOptions

public struct JsonDocumentOptions
Provides the ability for the user to define custom behavior when parsing JSON to create a JsonDocument.
public bool AllowTrailingCommas { get; set; }

Defines whether an extra comma at the end of a list of JSON values in an object or array is allowed (and ignored) within the JSON payload being read.

public JsonCommentHandling CommentHandling { get; set; }

Defines how the Utf8JsonReader should handle comments when reading through the JSON.

public int MaxDepth { get; set; }

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