When importing a Json file, a number that is written as 1.0 is treated as a float. However, when this value is written back out, it writes out as a 1 so the next time it reads it back in, it treats it as an integer.
The occurs in three functions:
function TJsonDataValue.GetValue: string;
function DoubleToText(Buffer: PChar; const Value: Extended): Integer; inline;
class operator TJsonDataValueHelper.Implicit(const Value: TJsonDataValueHelper): string;
Delphi does not have formatting tool that forces a decimal point (well, I guess FormatFloat() can be made to) so in both cases I check for a decimal and add one if missing. (where decimal is JSONFormatSettings.DecimalSeparator).
When importing a Json file, a number that is written as 1.0 is treated as a float. However, when this value is written back out, it writes out as a 1 so the next time it reads it back in, it treats it as an integer.
The occurs in three functions:
Delphi does not have formatting tool that forces a decimal point (well, I guess FormatFloat() can be made to) so in both cases I check for a decimal and add one if missing. (where decimal is JSONFormatSettings.DecimalSeparator).