Delphi ActiveX Requires Chilkat v11.0.0+
Delphi ActiveX
Transition from Crypt2.LastJsonData to Crypt2.GetLastJsonData
Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.Chilkat Delphi ActiveX Downloads
var
success: Integer;
crypt2: TChilkatCrypt2;
jsonObj: IChilkatJsonObject;
jsonOut: TChilkatJsonObject;
begin
success := 0;
crypt2 := TChilkatCrypt2.Create(Self);
// ...
// ...
// ------------------------------------------------------------------------
// The LastJsonData method is deprecated:
jsonObj := crypt2.LastJsonData();
if (crypt2.LastMethodSuccess = 0) then
begin
Memo1.Lines.Add(crypt2.LastErrorText);
Exit;
end;
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using GetLastJsonData.
// Your application creates a new, empty JsonObject object which is passed
// in the last argument and filled upon success.
jsonOut := TChilkatJsonObject.Create(Self);
crypt2.GetLastJsonData(jsonOut.ControlInterface);
if (success = 0) then
begin
Memo1.Lines.Add(crypt2.LastErrorText);
Exit;
end;