Utf8JsonReader.GetBytesFromBase64 Method
Definition
Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: Utf8JsonReader.TryGet.cs
GetBytesFromBase64()
Parses the current JSON token value from the source and decodes the Base64 encoded JSON string as bytes.
public byte[] GetBytesFromBase64()
Returns
Exceptions
| Exception | Description |
|---|---|
InvalidOperationException |
Thrown if trying to get the value of a JSON token that is not a String. |
FormatException |
The JSON string contains data outside of the expected Base64 range, or if it contains invalid/more than two padding characters, or is incomplete (i.e. the JSON string length is not a multiple of 4). |
Applies To
| Product | Versions |
|---|---|
| .NET | 9, 10 |
| .NET Standard | 2.0, 2.1 |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests.
Open an issue