I have the following JSON format:
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 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:
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
I'm then using

Code:
Dim balances As ItemsReturned = JsonConvert.DeserializeObject(Of ItemsReturned)(TheJson)
but this gives me the error "cannot deserialize the current JSON array because the type requires a JSON object"