Språk

JsonReader.NextLong Method

Definition

Returns the JsonToken#NUMBER long value of the next token, consuming it.

[Android.Runtime.Register("nextLong", "()J", "")]
public long NextLong();
[<Android.Runtime.Register("nextLong", "()J", "")>]
member this.NextLong : unit -> int64

Returns

The parsed 64-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 64-bit integer conversion cast back to double.

Remarks

Returns the JsonToken#NUMBER long value of the next token, consuming it. If the next token is a string, this method will attempt to parse it as a long. 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.nextLong().

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