serializeValue

Number serialization

Examples

import std.bigint;

assert(serializeToJson(BigInt(123)) == `123`);
assert(serializeToJson(2.40f) == `2.4`);
assert(serializeToJson(float.nan) == `"nan"`);
assert(serializeToJson(float.infinity) == `"inf"`);
assert(serializeToJson(-float.infinity) == `"-inf"`);

Meta