JsonCommentHandling 枚举


定义 Utf8JsonReader 结构处理注释的方式。Defines how the Utf8JsonReader struct handles comments.

public enum class JsonCommentHandling
public enum JsonCommentHandling
type JsonCommentHandling = 
Public Enum JsonCommentHandling


Allow 2

允许在 JSON 输入中使用注释,并将其视为有效标记。Allows comments within the JSON input and treats them as valid tokens. 读取项时,调用方可以访问注释值。While reading, the caller can access the comment values.

Disallow 0

不允许在 JSON 输入中使用注释。Doesn't allow comments within the JSON input. 若找到注释,可将其视为 JSON,并且引发 JsonExceptionComments are treated as invalid JSON if found, and a JsonException is thrown. 这是默认值。This is the default value.

Skip 1

允许在 JSON 输入中使用注释并忽略它们。Allows comments within the JSON input and ignores them. Utf8JsonReader 的行为方式假设不存在注释。The Utf8JsonReader behaves as if no comments are present.