1234567module juptune.data.json.parser;
Result asInt(
IntegralT
)(
IntegralT number
);
Retrieves the value of this integer token, and attempts to coerce it into the given IntegralT.
This function only works on integer tokens. Floats must either use asFloat(TODO) or asNumber(TODO).
The value of numberis undefined if this function returns an error.
JsonParserError.numberCannotBeRepresentedif the number was too big or too small to fit into any native integer type.
JsonParserError.numberCannotBeRepresentedif the number stored can be represented by a native integer type, but not by the specified IntegralT.
JsonParserError.numberIsNegativeif IntegralTis unsigned, but the number stored is negative.
An errorful Resultif something went wrong.