JSONParser.getNumber

Get the next number.

The number will be verified according to the JSON spec, but is parsed using std. Because of this, you can request a string return value, in order to perform manual conversion if needed.

Implementation note: If the number contains an uppercase E, it will be converted to lowercase.

struct JSONParser
T
getNumber
(
T
)
()
if (
isNumeric!T ||
isSomeString!T
)

Parameters

T

Type of the returned number, eg. int or real. Can also be a string type, if conversion should be done manually, or the number is expected to be big.

Return Value

Type: T

The matched number.

Throws

JSONException if the next item isn't a number.

Meta