Sample code for 30+ languages & platforms
Chilkat2-Python

Transition from Crypt2.LastJsonData to Crypt2.GetLastJsonData

Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.

Chilkat Chilkat2-Python Downloads

Chilkat2-Python
import sys
import chilkat2

success = False

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()
crypt2.GetLastJsonData(jsonOut)
if (success == False):
    print(crypt2.LastErrorText)
    sys.exit()