Utf8JsonWriter.WriteBase64StringValue(ReadOnlySpan<Byte>) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會把原始位元組值寫成 Base64 編碼的 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。
備註
二進位資料最大允許寫入 Base64 的大小為 125,000,000 位元組(約 125 MB)。 超過這個限制會被 ArgumentException 擲出。
這些位元組在寫入前會先編碼。