Hello Delphi-Praxis!
I discovered a change to System.JSON as compared to Rio/Sydney:
function FloatToJson(const Value: Extended): string;
var
Buffer: array[0..63] of Char;
L: Integer;
begin
L := FloatToText(Buffer, Value, fvExtended, ffGeneral, 17, 0, JSONFormatSettings);
Buffer[L] := #0;
if (StrScan(Buffer, '.') = nil) and (StrScan(Buffer, 'E') = nil) and
not (Value.SpecialType in [fsInf, fsNInf, fsNaN]) then
begin
Buffer[L] := '.';
Buffer[L + 1] := '0';
Inc(L, 2);
end;
SetString(Result, Buffer, L);
end;
We are appending ".0" to all extended values if FloatToText doesn't do that. This causes Currency values to be formatted as e.g. "3.0" instead of "3".
Should I report this to QC?