Sample code for 30+ languages & platforms
DataFlex

Transition from MailMan.LastJsonData to MailMan.GetLastJsonData

Provides instructions for replacing deprecated LastJsonData method calls with GetLastJsonData.

Chilkat DataFlex Downloads

DataFlex
Use ChilkatAx-win32.pkg

Procedure Test
    Handle hoMailman
    Variant vJsonObj
    Handle hoJsonObj
    Variant vJsonOut
    Handle hoJsonOut
    String sTemp1
    Boolean bTemp1

    Get Create (RefClass(cComChilkatMailMan)) To hoMailman
    If (Not(IsComObjectCreated(hoMailman))) Begin
        Send CreateComObject of hoMailman
    End

    // ...
    // ...

    // ------------------------------------------------------------------------
    // The LastJsonData method is deprecated:

    Get ComLastJsonData Of hoMailman To vJsonObj
    If (IsComObject(vJsonObj)) Begin
        Get Create (RefClass(cComChilkatJsonObject)) To hoJsonObj
        Set pvComObject Of hoJsonObj To vJsonObj
    End
    Get ComLastMethodSuccess Of hoMailman To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoMailman To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    // ...
    // ...

    Send Destroy of hoJsonObj

    // ------------------------------------------------------------------------
    // Do the equivalent using GetLastJsonData.
    // Your application creates a new, empty JsonObject object which is passed 
    // in the last argument.

    Get Create (RefClass(cComChilkatJsonObject)) To hoJsonOut
    If (Not(IsComObjectCreated(hoJsonOut))) Begin
        Send CreateComObject of hoJsonOut
    End
    Get pvComObject of hoJsonOut to vJsonOut
    Send ComGetLastJsonData To hoMailman vJsonOut


End_Procedure