Utf8JsonReader.GetInt32 方法

定义

从源中读取下一个 JSON 令牌值,并将该值解析为 Int32Reads the next JSON token value from the source and parses it to an Int32.

public:
 int GetInt32();
public int GetInt32 ();
member this.GetInt32 : unit -> int
Public Function GetInt32 () As Integer

返回

Int32

解析为 Int32 的 UTF-8 编码令牌值。The UTF-8 encoded token value parsed to an Int32.

例外

JSON 令牌值不是 NumberThe JSON token value isn't a Number.

JSON 令牌值的数值格式不正确。The JSON token value is of the incorrect numeric format. 例如,它包含小数或采用科学记数法编写。For example, it contains a decimal or is written in scientific notation.

- 或 --or-

JSON 令牌值表示小于 MinValue 或大于 MaxValue 的数字。The JSON token value represents a number less than MinValue or greater than MaxValue.

适用于

另请参阅