JsonReaderOptions.AllowTrailingCommas 属性

定义

获取或设置一个值,该值定义是否允许读取 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 个。

适用于