json4delphi
json4delphi copied to clipboard
GLB_JSON_STD_DECIMALSEPARATOR
Hi, JsonsUtils_GLB_DECIMALSEPARATOR would be replaced by GLB_JSON_STD_DECIMALSEPARATOR and not the opposite:
function FixedTryStrToFloat(const S: string; out Value: Extended): Boolean;
var
FixedS: string;
begin
if JsonsUtils_GLB_DECIMALSEPARATOR = GLB_JSON_STD_DECIMALSEPARATOR then
begin
Result := TryStrToFloat(S, Value);
end
else
begin
FixedS := StringReplace( S,
JsonsUtils_GLB_DECIMALSEPARATOR,
GLB_JSON_STD_DECIMALSEPARATOR,
[rfReplaceAll]);
Result := TryStrToFloat(FixedS, Value);
end;
end;
Best regards.