C
C
Transition from MailMan.LastJsonData to MailMan.GetLastJsonData
Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.Chilkat C Downloads
#include <C_CkMailMan.h>
#include <C_CkJsonObject.h>
void ChilkatSample(void)
{
HCkMailMan mailman;
HCkJsonObject jsonObj;
HCkJsonObject jsonOut;
mailman = CkMailMan_Create();
// ...
// ...
// ------------------------------------------------------------------------
// The LastJsonData method is deprecated:
jsonObj = CkMailMan_LastJsonData(mailman);
if (CkMailMan_getLastMethodSuccess(mailman) == FALSE) {
printf("%s\n",CkMailMan_lastErrorText(mailman));
CkMailMan_Dispose(mailman);
return;
}
// ...
// ...
CkJsonObject_Dispose(jsonObj);
// ------------------------------------------------------------------------
// Do the equivalent using GetLastJsonData.
// Your application creates a new, empty JsonObject object which is passed
// in the last argument.
jsonOut = CkJsonObject_Create();
CkMailMan_GetLastJsonData(mailman,jsonOut);
CkMailMan_Dispose(mailman);
CkJsonObject_Dispose(jsonOut);
}