Utf8JsonWriter.WriteBase64StringValue(ReadOnlySpan<Byte>) 方法

定義

以 Base64 編碼 JSON 字串將原始位元組值寫入為 JSON 陣列元素。

public:
 void WriteBase64StringValue(ReadOnlySpan<System::Byte> bytes);
public void WriteBase64StringValue (ReadOnlySpan<byte> bytes);
member this.WriteBase64StringValue : ReadOnlySpan<byte> -> unit
Public Sub WriteBase64StringValue (bytes As ReadOnlySpan(Of Byte))

參數

bytes
ReadOnlySpan<Byte>

要以 Base64 編碼 JSON 字串形式寫入為 JSON 陣列元素的二進位資料。

例外狀況

指定的值太大。

已啟用驗證,且此方法會導致寫入無效的 JSON。

備註

要寫入為 Base64 的二進位資料大小上限為 125,000,000 個位元組 (或大約 125 MB) 。 超過此限制會導致 ArgumentException 擲回 。

在寫入之前,會先編碼位元組。

適用於