JSONValue floating and 42
Andre via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Apr 19 06:44:08 PDT 2016
Hi,
I have to deal with a JSON like this
[{"value":42},{"value":1e+100}]
Value is a floating number, but the providing system does not
write 42 as 42.00.
While trying to get the value with .floating, I get an exception
because 42 is not
a floating value.
I try to understand what is the issue here.
-> Does the system violates the JSON Standard, and it should
deliver 42.00?
-> .floating should be enhanced to handle 42?
-> I need to analyze every value whether it is a floating or an
integer?
Kind regards
André
More information about the Digitalmars-d-learn
mailing list