JSONNumber

Represents a JSON number literal with lazy conversion.

Constructors

this
this(double value)
this(long value)
this(BigInt value)

Constructs a JSONNumber from a raw number.

Alias This

doubleValue

Makes a JSONNumber behave like a double by default.

Members

Enums

Type
enum Type
Undocumented in source.

Functions

opAssign
void opAssign(JSONNumber other)
void opAssign(double value)
void opAssign(long value)
void opAssign(BigInt value)

Support assignment of numbers.

opCmp
int opCmp(T other)

Support relational comparisons

opEquals
bool opEquals(T other)

Support equality comparisons

toHash
size_t toHash()

Support use as hash key

Properties

bigIntValue
BigInt bigIntValue [@property getter]
BigInt bigIntValue [@property setter]

Returns the number as a BigInt value.

doubleValue
double doubleValue [@property getter]
double doubleValue [@property setter]

Returns the number as a double value.

longValue
long longValue [@property getter]
long longValue [@property setter]

Returns the number as a long value.

type
Type type [@property getter]

The native type of the stored number.

Meta