I'm using Blockchain.info API. I want to deserialize the JSON response. An example response:
{
"addresses": [
{
"balance": 1400938800,
"address": "1Q1AtvCyKhtveGm3187mgNRh5YcukUWjQC",
"label": "SMS Deposits",
"total_received": 5954572400
},
{
"balance": 79434360,
"address": "1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq",
"label": "My Wallet",
"total_received": 453300048335
},
{
"balance": 0,
"address": "17p49XUC2fw4Fn53WjZqYAm4APKqhNPEkY",
"total_received": 0
}
]
}
I want to know how to make a class that fits this. I tried this but it's not working:
Public Function LoadJson(ByVal json As String)
Dim items As List(Of addresses) = JsonConvert.DeserializeObject(Of List(Of addresses))(json)
Return items
End Function
Public Class addresses
Public addresses As address()
End Class
Public Class address
Public balance
Public address
Public label
Public total_received
End Class