Utf8JsonReader.TryGetBytesFromBase64(Byte[]) Method

Definition

Tries to parse the current JSON token value from the source and decodes the Base64 encoded JSON string as a byte array and returns a value that indicates whether the operation succeeded.

public bool TryGetBytesFromBase64 (out byte[]? value);
public bool TryGetBytesFromBase64 (out byte[] value);

Parameters

value
Byte[]

When this method returns, contains the decoded binary representation of the Base64 text.

Returns

true if the entire token value is encoded as valid Base64 text and can be successfully decoded to bytes; otherwise, false.

Exceptions

The JSON token is not a String.

Applies to

Produkt Verze
.NET Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

See also