Utf8JsonReader.GetSByte Method
Definition
Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: Utf8JsonReader.TryGet.cs
GetSByte()
Parses the current JSON token value from the source as an SByte. Returns the value if the entire UTF-8 encoded token value can be successfully parsed to an SByte value. Throws exceptions otherwise.
public sbyte GetSByte()
Returns
Exceptions
| Exception | Description |
|---|---|
InvalidOperationException |
Thrown if trying to get the value of a JSON token that is not a Number. |
FormatException |
Thrown if the JSON token value is either of incorrect numeric format (for example if it contains a decimal or is written in scientific notation) or, it represents a number less than MinValue or greater than MaxValue. |
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