how to use json code in visual basic

hi,
i have tried to retrieve balance of my account using following code
websocket.Send("{""passthrough"": { ""balance"": ""1"", ""subscribe"": ""1"" }, ""req_id"": 2}")
but,it doesn't retrieve any result.

Comments

  • @mahendran1992 you are passing call inside passthrough

    {
      "passthrough": {
        "balance": "1",
        "subscribe": "1"
      },
      "req_id": 2
    }
    

    it should be like this

    {
      "passthrough": {},
      "req_id": 2,
      "balance": "1",
      "subscribe": 1
    }
    
  • I GOT AN OUTPUT AS FOLLOWS IN A TEXTBOX,
    {"balance":{"balance":"5.87","currency":"USD","loginid":"CR386850"},"echo_req":{"balance":"1"},"msg_type":"balance"}
    Now,i want to know how to separate the balance amount and display it separately on a textbox in vb as follows
    balance:5.87

  • you need to parse json in language you are using, for vb search for parse json in vb

Sign In or Register to comment.