Επεξεργασία

Κοινή χρήση μέσω


Utf8JsonWriter.WriteBase64String Method

Definition

Overloads

WriteBase64String(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

Writes the property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

WriteBase64String(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

Writes the property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

WriteBase64String(String, ReadOnlySpan<Byte>)

Writes the property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

WriteBase64String(JsonEncodedText, ReadOnlySpan<Byte>)

Writes the pre-encoded property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

WriteBase64String(ReadOnlySpan<Byte>, ReadOnlySpan<Byte>)

Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs

Writes the property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

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

Parameters

utf8PropertyName
ReadOnlySpan<Byte>

The UTF-8 encoded name of the property to write.

bytes
ReadOnlySpan<Byte>

The binary data to write as Base64 encoded text.

Exceptions

The specified property name or value is too large.

Validation is enabled, and this method would result in writing invalid JSON.

Remarks

The maximum allowed size of the binary data to write as Base64 is 125,000,000 bytes (or approximately 125 MB). Exceeding this limit results in an ArgumentException being thrown.

The property name is escaped and the bytes are encoded before writing.

Applies to

WriteBase64String(ReadOnlySpan<Char>, ReadOnlySpan<Byte>)

Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs

Writes the property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

public:
 void WriteBase64String(ReadOnlySpan<char> propertyName, ReadOnlySpan<System::Byte> bytes);
public void WriteBase64String (ReadOnlySpan<char> propertyName, ReadOnlySpan<byte> bytes);
member this.WriteBase64String : ReadOnlySpan<char> * ReadOnlySpan<byte> -> unit
Public Sub WriteBase64String (propertyName As ReadOnlySpan(Of Char), bytes As ReadOnlySpan(Of Byte))

Parameters

propertyName
ReadOnlySpan<Char>

The property name of the JSON object to be transcoded and written as UTF-8.

bytes
ReadOnlySpan<Byte>

The binary data to write as Base64 encoded text.

Exceptions

The specified property name or value is too large.

Validation is enabled, and this method would result in writing invalid JSON.

Remarks

The maximum allowed size of the binary data to write as Base64 is 125,000,000 bytes (or approximately 125 MB). Exceeding this limit results in an ArgumentException being thrown.

The property name is escaped and the bytes are encoded before writing.

Applies to

WriteBase64String(String, ReadOnlySpan<Byte>)

Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs

Writes the property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

public:
 void WriteBase64String(System::String ^ propertyName, ReadOnlySpan<System::Byte> bytes);
public void WriteBase64String (string propertyName, ReadOnlySpan<byte> bytes);
member this.WriteBase64String : string * ReadOnlySpan<byte> -> unit
Public Sub WriteBase64String (propertyName As String, bytes As ReadOnlySpan(Of Byte))

Parameters

propertyName
String

The property name of the JSON object to be transcoded and written as UTF-8.

bytes
ReadOnlySpan<Byte>

The binary data to write as Base64 encoded text.

Exceptions

The specified property name or value is too large.

Validation is enabled, and this method would result in writing invalid JSON.

The propertyName parameter is null.

Remarks

The maximum allowed size of the binary data to write as Base64 is 125,000,000 bytes (or approximately 125 MB). Exceeding this limit results in an ArgumentException being thrown.

The property name is escaped and the bytes are encoded before writing.

Applies to

WriteBase64String(JsonEncodedText, ReadOnlySpan<Byte>)

Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs
Source:
Utf8JsonWriter.WriteProperties.Bytes.cs

Writes the pre-encoded property name and raw bytes value (as a Base64 encoded JSON string) as part of a name/value pair of a JSON object.

public:
 void WriteBase64String(System::Text::Json::JsonEncodedText propertyName, ReadOnlySpan<System::Byte> bytes);
public void WriteBase64String (System.Text.Json.JsonEncodedText propertyName, ReadOnlySpan<byte> bytes);
member this.WriteBase64String : System.Text.Json.JsonEncodedText * ReadOnlySpan<byte> -> unit
Public Sub WriteBase64String (propertyName As JsonEncodedText, bytes As ReadOnlySpan(Of Byte))

Parameters

propertyName
JsonEncodedText

The JSON-encoded name of the property to write.

bytes
ReadOnlySpan<Byte>

The binary data to write as Base64 encoded text.

Exceptions

The specified value is too large.

Validation is enabled, and this method would result in writing invalid JSON.

Remarks

The maximum allowed size of the binary data to write as Base64 is 125,000,000 bytes (or approximately 125 MB). Exceeding this limit results in an ArgumentException being thrown.

The property name should already be escaped when the instance of JsonEncodedText was created.

The bytes are encoded before writing.

Applies to