(PureBasic) Transition from Http.LastJsonData to Http.GetLastJsonData
Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.Note: This example requires Chilkat v11.0.0 or greater.
IncludeFile "CkJsonObject.pb"
IncludeFile "CkHttp.pb"
Procedure ChilkatExample()
http.i = CkHttp::ckCreate()
If http.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
; ...
; ...
; ------------------------------------------------------------------------
; The LastJsonData method is deprecated:
json1.i = CkHttp::ckLastJsonData(http)
Debug CkJsonObject::ckEmit(json1)
CkJsonObject::ckDispose(json1)
; ------------------------------------------------------------------------
; Do the equivalent using GetLastJsonData.
json2.i = CkJsonObject::ckCreate()
If json2.i = 0
Debug "Failed to create object."
ProcedureReturn
EndIf
CkHttp::ckGetLastJsonData(http,json2)
Debug CkJsonObject::ckEmit(json2)
CkHttp::ckDispose(http)
CkJsonObject::ckDispose(json2)
ProcedureReturn
EndProcedure
|