Module bets
Public Class ABet
Public jsonrpc As String
Public result As New currentOrders
Public id As Long
End Class
Public Class currentOrders
Public betId As String
Public marketId As String
Public selectionId As Long
Public handicap As Double
Public priceSize As New PriceSize
.
.
.
.
responseFromServer = "{""jsonrpc"":""2.0"",""result"":{""currentOrders" ":{""betId"":""158634874286"",""marketId"":""1.156 703637"",""selectionId"":14025157,""handicap"":0.0 ,""priceSize"":{""price"":1.13,""size"":2.0},""bsp Liability"":0.0,""side"":""BACK"",""status"":""EXE CUTION_COMPLETE"",""persistenceType"":""LAPSE"","" orderType"":""LIMIT"",""placedDate"":""2019-03-26T11:12:39.000Z"",""matchedDate"":""2019-03-26T11:12:39.000Z"",""averagePriceMatched"":1.193," "sizeMatched"":2.0,""sizeRemaining"":0.0,""sizeLap sed"":0.0,""sizeCancelled"":0.0,""sizeVoided"":0.0 ,""regulatorCode"":""GIBRALTAR REGULATOR""},""moreAvailable"":false},""id"":1}"
Dim ThisToken As ABet = Newtonsoft.Json.JsonConvert.DeserializeObject(Of ABet)(responseFromServer)
Form1.TextBox55.Text = ThisToken.jsonrpc 'CORRECT RESULT OF 2.0
Form1.TextBox56.Text = ThisToken.result.betId 'EMPTY RESULT
Why do I get an empty response for betID?
Tried lots of variations.
responseFromServer hardcoded in for testing
Thanks,
Evan.
Public Class ABet
Public jsonrpc As String
Public result As New currentOrders
Public id As Long
End Class
Public Class currentOrders
Public betId As String
Public marketId As String
Public selectionId As Long
Public handicap As Double
Public priceSize As New PriceSize
.
.
.
.
responseFromServer = "{""jsonrpc"":""2.0"",""result"":{""currentOrders" ":{""betId"":""158634874286"",""marketId"":""1.156 703637"",""selectionId"":14025157,""handicap"":0.0 ,""priceSize"":{""price"":1.13,""size"":2.0},""bsp Liability"":0.0,""side"":""BACK"",""status"":""EXE CUTION_COMPLETE"",""persistenceType"":""LAPSE"","" orderType"":""LIMIT"",""placedDate"":""2019-03-26T11:12:39.000Z"",""matchedDate"":""2019-03-26T11:12:39.000Z"",""averagePriceMatched"":1.193," "sizeMatched"":2.0,""sizeRemaining"":0.0,""sizeLap sed"":0.0,""sizeCancelled"":0.0,""sizeVoided"":0.0 ,""regulatorCode"":""GIBRALTAR REGULATOR""},""moreAvailable"":false},""id"":1}"
Dim ThisToken As ABet = Newtonsoft.Json.JsonConvert.DeserializeObject(Of ABet)(responseFromServer)
Form1.TextBox55.Text = ThisToken.jsonrpc 'CORRECT RESULT OF 2.0
Form1.TextBox56.Text = ThisToken.result.betId 'EMPTY RESULT
Why do I get an empty response for betID?
Tried lots of variations.
responseFromServer hardcoded in for testing
Thanks,
Evan.


Comment