JsonReader.NextInt Method

Definition

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

Attributes

Exceptions

if the next token is not a literal value.

if the next literal value cannot be parsed as a number, or exactly represented as an int.

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 the next token's numeric value cannot be exactly represented by a Java int, this method throws.

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.

Applies to