JsonDocumentOptions 结构

定义

分析 JSON 以创建 JsonDocument 时,为用户提供定义自定义行为的功能。Provides the ability for the user to define custom behavior when parsing JSON to create a JsonDocument.

public value class JsonDocumentOptions
public struct JsonDocumentOptions
type JsonDocumentOptions = struct
Public Structure JsonDocumentOptions
继承
JsonDocumentOptions

注解

有关详细信息,请参阅如何序列化和反序列化 JSONFor more information, see How to serialize and deserialize JSON.

属性

AllowTrailingCommas

获取或设置一个值,该值指示要读取的 JSON 有效负载中是否允许(和忽略)对象或数组中 JSON 值的列表末尾多余的逗号。Gets or sets a value that indicates whether an extra comma at the end of a list of JSON values in an object or array is allowed (and ignored) within the JSON payload being read.

CommentHandling

获取或设置一个值,该值确定在读取 JSON 数据时,JsonDocument 处理注释的方式。Gets or sets a value that determines how the JsonDocument handles comments when reading through the JSON data.

MaxDepth

获取或设置分析 JSON 数据时允许的最大深度,默认值(即 0)表示最大深度为 64。Gets or sets the maximum depth allowed when parsing JSON data, with the default (that is, 0) indicating a maximum depth of 64.

适用于