(Swift) Transition from MailMan.LastJsonData to MailMan.GetLastJsonData
Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData. Note: This example requires Chilkat v11.0.0 or greater.
func chilkatTest() {
let mailman = CkoMailMan()!
// ...
// ...
// ------------------------------------------------------------------------
// The LastJsonData method is deprecated:
var jsonObj: CkoJsonObject? = mailman.lastJsonData()
if mailman.lastMethodSuccess == false {
print("\(mailman.lastErrorText!)")
return
}
// ...
// ...
jsonObj = nil
// ------------------------------------------------------------------------
// Do the equivalent using GetLastJsonData.
// Your application creates a new, empty JsonObject object which is passed
// in the last argument.
let jsonOut = CkoJsonObject()!
mailman.getLastJsonData(jsonOut)
}
|