You've already forked lazarus-ccr
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:
@ -756,9 +756,7 @@ var
|
|||||||
cont: TVpContact;
|
cont: TVpContact;
|
||||||
task: TvpTask;
|
task: TvpTask;
|
||||||
i, j: Integer;
|
i, j: Integer;
|
||||||
{$IF FPC_FullVersion < 30000}
|
|
||||||
s: TJSONStringType;
|
s: TJSONStringType;
|
||||||
{$ENDIF}
|
|
||||||
begin
|
begin
|
||||||
if AStream = nil then
|
if AStream = nil then
|
||||||
raise Exception.Create('No stream specified');
|
raise Exception.Create('No stream specified');
|
||||||
@ -819,13 +817,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$IF FPC_FULLVERSION < 030000}
|
|
||||||
s := json.FormatJSON;
|
s := json.FormatJSON;
|
||||||
AStream.Write(s[1], Length(s));
|
AStream.Write(s[1], Length(s));
|
||||||
{$ELSE}
|
|
||||||
json.DumpJSON(AStream);
|
|
||||||
{$ENDIF}
|
|
||||||
|
|
||||||
finally
|
finally
|
||||||
json.Free;
|
json.Free;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user