Skip to content

JsonCommentHandling

Definition

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

This enum defines the various ways the Utf8JsonReader can deal with comments.

public enum JsonCommentHandling : IComparable, ISpanFormattable, IFormattable, IConvertible

Implements

IComparable, ISpanFormattable, IFormattable, IConvertible

Fields

Field Type Description
Disallow static JsonCommentHandling By default, do no allow comments within the JSON input. Comments are treated as invalid JSON if found and a JsonException is thrown.
Skip static JsonCommentHandling Allow comments within the JSON input and ignore them. The Utf8JsonReader will behave as if no comments were present.
Allow static JsonCommentHandling Allow comments within the JSON input and treat them as valid tokens. While reading, the caller will be able to access the comment values.

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