JsonReaderOptions.AllowTrailingCommas 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值定义是否允许读取 JSON 有效负载中的 JSON 值列表末尾的额外逗号(并忽略)。
public:
property bool AllowTrailingCommas { bool get(); void set(bool value); };
public bool AllowTrailingCommas { get; set; }
member this.AllowTrailingCommas : bool with get, set
Public Property AllowTrailingCommas As Boolean
属性值
true 如果允许额外的逗号,则为否则,为 false.
注解
默认情况下,此属性设置为 false,如果遇到尾随逗号,则会引发一 JsonException 个。