Results 1 to 10 of 12

Thread: What happens to the object?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Beech Hill - a village near Reading in the UK
    Posts
    2,805

    Default What happens to the object?

    Question for Harm really...

    Is this OK?
    Code:
    Procedure Test
        Handle  hoJson
        Boolean bOK
        
        Get Create (RefClass(cJsonObject)) to hoJson
        Get ParseString of hoJson '{"obj": {"Foo": "Bar"}}' to bOK
        Showln (MemberValue(Member(hoJson, "obj"), "Foo"))  // shows "Bar" (unquoted)
        Send Destroy of hoJson
    End_Procedure
    If so, what happens to the JSON object ("obj") returned by the (inner) call to Member(hoJson, "obj")?

    Mike

    PS - Showln (Name(Member(hoJson, "obj"))) shows "oJsonObject" (unquoted).
    PPS - Showln (Name(Parent(Member(hoJson, "obj")))) shows "DESKTOP" (unquoted).
    Last edited by Mike Peat; 19-Jun-2019 at 05:09 AM. Reason: PS & PPS

Posting Permissions

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