Sample code for 30+ languages & platforms
C++

Transition from MailMan.LastJsonData to MailMan.GetLastJsonData

Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.

Chilkat C++ Downloads

C++
#include <CkMailMan.h>
#include <CkJsonObject.h>

void ChilkatSample(void)
    {
    CkMailMan mailman;

    //  ...
    //  ...

    //  ------------------------------------------------------------------------
    //  The LastJsonData method is deprecated:

    CkJsonObject *jsonObj = mailman.LastJsonData();
    if (mailman.get_LastMethodSuccess() == false) {
        std::cout << mailman.lastErrorText() << "\r\n";
        return;
    }

    //  ...
    //  ...

    delete jsonObj;

    //  ------------------------------------------------------------------------
    //  Do the equivalent using GetLastJsonData.
    //  Your application creates a new, empty JsonObject object which is passed 
    //  in the last argument.

    CkJsonObject jsonOut;
    mailman.GetLastJsonData(jsonOut);
    }