(Ruby) 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.
require 'chilkat'
crypt2 = Chilkat::CkCrypt2.new()
# ...
# ...
# ------------------------------------------------------------------------
# The LastJsonData method is deprecated:
# jsonObj is a CkJsonObject
jsonObj = crypt2.LastJsonData()
if (crypt2.get_LastMethodSuccess() == false)
print crypt2.lastErrorText() + "\n";
exit
end
# ...
# ...
# ------------------------------------------------------------------------
# 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 = Chilkat::CkJsonObject.new()
success = crypt2.GetLastJsonData(jsonOut)
if (success == false)
print crypt2.lastErrorText() + "\n";
exit
end
|