JsonneD.makeNumber

Convert the given double to a JsonnetJsonValue.

struct JsonneD
makeNumber
(
double v
)

Examples

import std.math : approxEqual;
double s = 13.37;
JsonneD jd = JsonneD();
JsonnetValue sv = jd.makeNumber(s);
Nullable!double ss = sv.extractNumber();
assert(!ss.isNull());
assert(approxEqual(s, ss));

Meta