Java
Java
Transition from MailMan.LastJsonData to MailMan.GetLastJsonData
Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.Chilkat Java Downloads
import com.chilkatsoft.*;
public class ChilkatExample {
static {
try {
System.loadLibrary("chilkat");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String argv[])
{
CkMailMan mailman = new CkMailMan();
// ...
// ...
// ------------------------------------------------------------------------
// The LastJsonData method is deprecated:
CkJsonObject jsonObj = mailman.LastJsonData();
if (mailman.get_LastMethodSuccess() == false) {
System.out.println(mailman.lastErrorText());
return;
}
// ...
// ...
// ------------------------------------------------------------------------
// Do the equivalent using GetLastJsonData.
// Your application creates a new, empty JsonObject object which is passed
// in the last argument.
CkJsonObject jsonOut = new CkJsonObject();
mailman.GetLastJsonData(jsonOut);
}
}