Results 1 to 6 of 6

Thread: Silent failure unpacking JSON

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Cayman
    Posts
    2,631

    Default Silent failure unpacking JSON

    This was working until today...
    sRespJSON contains:
    {"status":"ok","web_payment_code":2163,"list_id":" 2163.29123971","url":"http:some-url","time":1559314077}

    being unpacked into a struct:
    Code:
            Struct tWebPayResult //what teh website returns - similar for webpays, giftregs too
                String status
                String web_payment_code
                String list_id
                String url
                String Time            
            End_Struct
    by the following process:
    Code:
                tWebPayResult tWebResult
      
                        Get Create (Refclass(cJSONObject)) to hoResponse
                        Get Parsestring of hoResponse sRespJSON to bOK
                        If (bOK) Begin 
                            Get JSONtodatatype  of hoResponse to tWebResult
                        End
                        Move tWebResult.list_id to slistref

    leaves a blank struct, bOK is true
    Last edited by DaveR; 31-May-2019 at 10:31 AM.
    test? it compiles doesn't it?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •