<PackageReference Include="System.Text.Json" Version="9.0.0-rc.2.24473.5" />

JsonReaderOptions

public struct JsonReaderOptions
Provides the ability for the user to define custom behavior when reading JSON.
using System.Runtime.CompilerServices; namespace System.Text.Json { public struct JsonReaderOptions { internal const int DefaultMaxDepth = 64; private int _maxDepth; private JsonCommentHandling _commentHandling; public JsonCommentHandling CommentHandling { [System.Runtime.CompilerServices.IsReadOnly] get { return _commentHandling; } set { if ((int)value > 2) ThrowHelper.ThrowArgumentOutOfRangeException_CommentEnumMustBeInRange("value"); _commentHandling = value; } } public int MaxDepth { [System.Runtime.CompilerServices.IsReadOnly] get { return _maxDepth; } set { if (value < 0) ThrowHelper.ThrowArgumentOutOfRangeException_MaxDepthMustBePositive("value"); _maxDepth = value; } } public bool AllowTrailingCommas { [System.Runtime.CompilerServices.IsReadOnly] get; set; } public bool AllowMultipleValues { [System.Runtime.CompilerServices.IsReadOnly] get; set; } } }