JsonDocumentOptions.CommentHandling Property

Definition

Gets or sets a value that determines how the JsonDocument handles comments when reading through the JSON data.

public System.Text.Json.JsonCommentHandling CommentHandling { get; set; }

Property Value

One of the enumeration values that indicates how comments are handled.

Exceptions

The comment handling enum is set to a value that is not supported (or not within the JsonCommentHandling enum range).

Remarks

By default, a JsonException is thrown if a comment is encountered.

Applies to

Produit Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)