(PowerShell) 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.
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$mailman = New-Object Chilkat.MailMan
# ...
# ...
# ------------------------------------------------------------------------
# The LastJsonData method is deprecated:
$jsonObj = $mailman.LastJsonData()
if ($mailman.LastMethodSuccess -eq $false) {
$($mailman.LastErrorText)
exit
}
# ...
# ...
# ------------------------------------------------------------------------
# Do the equivalent using GetLastJsonData.
# Your application creates a new, empty JsonObject object which is passed
# in the last argument.
$jsonOut = New-Object Chilkat.JsonObject
$mailman.GetLastJsonData($jsonOut)
|