ערוך

שתף באמצעות


JsonElement.TryGetBytesFromBase64(Byte[]) Method

Definition

Attempts to represent the current JSON string as a byte array, assuming that it is Base64 encoded.

public:
 bool TryGetBytesFromBase64([Runtime::InteropServices::Out] cli::array <System::Byte> ^ % value);
public bool TryGetBytesFromBase64 (out byte[]? value);
public bool TryGetBytesFromBase64 (out byte[] value);
member this.TryGetBytesFromBase64 : Byte[] -> bool
Public Function TryGetBytesFromBase64 (ByRef value As Byte()) As Boolean

Parameters

value
Byte[]

If the method succeeds, 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 parent JsonDocument has been disposed.

Remarks

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

Applies to