tvplanit: Write nicely formatted json file.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8169 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-12-05 10:34:11 +00:00
parent bb91c39431
commit 2cecea18c8

View File

@ -756,9 +756,7 @@ var
cont: TVpContact;
task: TvpTask;
i, j: Integer;
{$IF FPC_FullVersion < 30000}
s: TJSONStringType;
{$ENDIF}
begin
if AStream = nil then
raise Exception.Create('No stream specified');
@ -819,13 +817,8 @@ begin
end;
end;
{$IF FPC_FULLVERSION < 030000}
s := json.FormatJSON;
AStream.Write(s[1], Length(s));
{$ELSE}
json.DumpJSON(AStream);
{$ENDIF}
finally
json.Free;
end;