On Tuesday, 5 August 2014 at 17:17:56 UTC, Andrei Alexandrescu
wrote:
On 8/5/14, 8:23 AM, Daniel Murphy wrote:
"Andrea Fontana" wrote in message
news:takluoqmlmmooxlov...@forum.dlang.org...
If I'm right, json has just one numeric type. No difference
between
integers / float and no limits.
So probably the mapping is:
float/double/real/int/long => number
Maybe, but std.json has three numeric types.
I searched around a bit and it seems different libraries have
different takes to this numeric matter. A simple reading of the
spec suggests that floating point data is the only numeric
type. However, many implementations choose to distinguish
between floating point and integrals.
There is certain benefit in using same primitive types for JSON
as ones defined by BSON spec.