<PackageReference Include="System.Text.Json" Version="6.0.9" />

JsonCommentHandling

public enum JsonCommentHandling
This enum defines the various ways the Utf8JsonReader can deal with comments.
Allow = 2

Allow comments within the JSON input and treat them as valid tokens. While reading, the caller will be able to access the comment values.

By default, do no allow comments within the JSON input. Comments are treated as invalid JSON if found and a JsonException is thrown.

Skip = 1

Allow comments within the JSON input and ignore them. The Utf8JsonReader will behave as if no comments were present.