Utf8JsonReader.GetBoolean Method
Definition
Namespace: Corvus.Text.Json
Assembly: Corvus.Text.Json.dll
Source: Utf8JsonReader.TryGet.cs
GetBoolean()
Parses the current JSON token value from the source as a Boolean. Returns true if the TokenType is JsonTokenType.True and false if the TokenType is JsonTokenType.False.
public bool GetBoolean()
Returns
Exceptions
| Exception | Description |
|---|---|
InvalidOperationException |
Thrown if trying to get the value of a JSON token that is not a boolean (i.e. True or False). |
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