JsonSerializerOptions.NewLine 属性

定义

获取或设置在何时true使用WriteIndented的新行字符串。

默认为 NewLine 的值。

public:
 property System::String ^ NewLine { System::String ^ get(); void set(System::String ^ value); };
public string NewLine { get; set; }
member this.NewLine : string with get, set
Public Property NewLine As String

属性值

例外

当新行字符串为 null时引发 。

当新行字符串不是 \n\r\n

在序列化或反序列化发生后设置此属性。

适用于