JsonElement.TryGetBytesFromBase64(Byte[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應