JsonElement.GetBytesFromBase64 Method

Definition

Gets the value of the element as a byte array.

C#
public byte[] GetBytesFromBase64();

Returns

Byte[]

The value decoded as a byte array.

Exceptions

The value is not encoded as Base64 text and hence cannot be decoded to bytes.

The parent JsonDocument has been disposed.

Remarks

This method does not create a byte representation of values other than Base64 encoded JSON strings.

Applies to

Produkt Versioner
.NET Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)