Sample code for 30+ languages & platforms
Ruby Requires Chilkat v11.0.0+

Transition from Crypt2.LastJsonData to Crypt2.GetLastJsonData

Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.

Chilkat Ruby Downloads

Ruby
require 'chilkat'

success = false

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()
crypt2.GetLastJsonData(jsonOut)
if (success == false)
    print crypt2.lastErrorText() + "\n";
    exit
end