Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

enum System.​Text.​Json.​JsonCommentHandling

Assembly: System.Text.Json

Defines how the <see cref="T:System.Text.Json.Utf8JsonReader" /> struct handles comments.

Values

Disallow
Doesn't allow comments within the JSON input. Comments are treated as invalid JSON if found, and a <see cref="T:System.Text.Json.JsonException" /> is thrown. This is the default value.
Skip
Allows comments within the JSON input and ignores them. The <see cref="T:System.Text.Json.Utf8JsonReader" /> behaves as if no comments are present.
Allow
Allows comments within the JSON input and treats them as valid tokens. While reading, the caller can access the comment values.