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

Transition from Http.LastJsonData to Http.GetLastJsonData

See more HTTP Examples

Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.

Chilkat PureBasic Downloads

PureBasic
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