You are not logged in.
Pages: 1
Hi!
As I understand, since mormot 2 can convert values to varCurrency, unlike Mormot 1, this code wont work If system's decimail separator set as comma:
var APrice: double;
ToDouble(_JsonFastFloat('{"price": 0.156}').price, APrice);
Im mormot 1 it was like
if AllowVarDouble then
typ := TextToVariantNumberType(JSON) else
typ := TextToVariantNumberTypeNoDouble(JSON);
and with delphi's FormatSettings.DecimalSeparator:='.'; the code above worked
Is there any option to prevent the mormot from generating varCurrency ?
Offline
I don't understand what you write, because mORMot does not at all take into account FormatSettings.
I write that I would expect APrice = 0.156 in this code:
ToDouble(_JsonFastFloat('{"price": 0.156}').price, APrice);
However actually APrice is not 0.156 in Mormot 2.
Offline
Pages: 1