JsonReader.NextInt Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the JsonToken#NUMBER int value of the next token,
consuming it.
[Android.Runtime.Register("nextInt", "()I", "")]
public int NextInt();
[<Android.Runtime.Register("nextInt", "()I", "")>]
member this.NextInt : unit -> int
Returns
The parsed 32-bit integer. Parsing through a double can round the token's value.
- Attributes
Exceptions
if the next token is not a literal value.
if the token cannot be parsed as a number, or the parsed double differs from its 32-bit integer conversion cast back to double.
Remarks
Returns the JsonToken#NUMBER int value of the next token, consuming it. If the next token is a string, this method will attempt to parse it as an int. If integer parsing fails, the method parses a double and checks it against its integer conversion cast back to double. Double parsing can round the token's value before this check.
Java documentation for android.util.JsonReader.nextInt().
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.