I have the following JSON format:
I'm trying to return some of the "available" and "amount" values, but cannot get it to work for the life of me. I created the following class:Code:[{ "type":"deposit", "currency":"btc", "amount":"0.0", "available":"0.0" },{ "type":"deposit", "currency":"usd", "amount":"1.0", "available":"1.0" },{ "type":"exchange", "currency":"btc", "amount":"1", "available":"1" },{ "type":"exchange", "currency":"usd", "amount":"1", "available":"1" },{ "type":"trading", "currency":"btc", "amount":"1", "available":"1" },{ "type":"trading", "currency":"usd", "amount":"1", "available":"1" }]
I'm then usingCode:Public Class ItemsReturned Public Property type As String Public Property currency As String Public Property amount As String Public Property available As String End Class
but this gives me the error "cannot deserialize the current JSON array because the type requires a JSON object"Code:Dim balances As ItemsReturned = JsonConvert.DeserializeObject(Of ItemsReturned)(TheJson)




Reply With Quote
