(Chilkat2-Python) Transition from Crypt2.LastJsonData to Crypt2.GetLastJsonData
Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData. Note: This example requires Chilkat v11.0.0 or greater.
import sys
import chilkat2
crypt2 = chilkat2.Crypt2()
# ...
# ...
# ------------------------------------------------------------------------
# The LastJsonData method is deprecated:
# jsonObj is a CkJsonObject
jsonObj = crypt2.LastJsonData()
if (crypt2.LastMethodSuccess == False):
print(crypt2.LastErrorText)
sys.exit()
# ...
# ...
# ------------------------------------------------------------------------
# Do the equivalent using GetLastJsonData.
# Your application creates a new, empty JsonObject object which is passed
# in the last argument and filled upon success.
jsonOut = chilkat2.JsonObject()
success = crypt2.GetLastJsonData(jsonOut)
if (success == False):
print(crypt2.LastErrorText)
sys.exit()
|