<PackageReference Include="System.Text.Json" Version="8.0.0-preview.5.23280.8" />

JsonCommentHandling

public enum JsonCommentHandling
Defines how the Utf8JsonReader struct handles comments.
Allow = 2

Allows comments within the JSON input and treats them as valid tokens. While reading, the caller can access the comment values.

Doesn't allow comments within the JSON input. Comments are treated as invalid JSON if found, and a JsonException is thrown. This is the default value.

Skip = 1

Allows comments within the JSON input and ignores them. The Utf8JsonReader behaves as if no comments are present.