Hello,
Would TStringStream be used to enhance writing performance instead of concatenating Json elements?
function TJsonArray.Stringify: String;
var
I: Integer;
Item: TJsonValue;
begin
Result := '[';
for I := 0 to FList.Count - 1 do
begin
Item := TJsonValue(FList[I]);
if I > 0 then Result := Result + ',';
Result := Result + Item.Stringify;
end;
Result := Result + ']';
end;
function TJsonObject.Stringify: String;
var
I: Integer;
Item: TJsonPair;
begin
Result := '{';
for I := 0 to FList.Count - 1 do
begin
Item := TJsonPair(FList[I]);
if I > 0 then Result := Result + ',';
Result := Result + Item.Stringify;
end;
Result := Result + '}';
end;
Best regards.
Hello,
Would TStringStream be used to enhance writing performance instead of concatenating Json elements?
Best regards.