JsonElement.GetInt16 Method
Definition
Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: JsonElement.cs
GetInt16()
Gets the current JSON number as an Int16.
public short GetInt16()
Returns
The current JSON number as an Int16.
Exceptions
| Exception | Description |
|---|---|
InvalidOperationException |
This value's ValueKind is not Number. |
FormatException |
The value cannot be represented as an Int16. |
ObjectDisposedException |
The parent JsonDocument has been disposed. |
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