Utf8JsonReader.GetBoolean 方法

定义

从源中将下一个 JSON 令牌值读取为 BooleanReads the next JSON token value from the source as a Boolean.

public:
 bool GetBoolean();
public bool GetBoolean ();
member this.GetBoolean : unit -> bool
Public Function GetBoolean () As Boolean

返回

Boolean

如果 TokenTypeTrue,则为 true;如果 TokenTypeFalse,则为 falsetrue if the TokenType is True; false if the TokenType is False.

例外

JSON 令牌的值不是布尔值(即 TrueFalse)。The value of the JSON token isn't a boolean value (that is, True or False).

适用于

另请参阅