'How to get all the values from a JSON array
I'm trying to get all the keys from a JSON array. The link of the JSON is: this one
And the code I'm using is:
Imports System.Net.Http
Imports System.Text.Json.Nodes
Public Class Form1
Private Async Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Using http = New HttpClient
Dim url = "https://api-cloud.bitmart.com/account/v1/currencies"
Dim json = JsonNode.Parse(Await http.GetStreamAsync(url))
Dim naming As [String] = json("currency")
RichTextBox1.Text = json("currency")
End Using
End Sub
End Class
But clicking the Button doesn't populate anything. The RichTextBox stays empty,
while I want to get all the values ( es : "DFC, "$GM", "BBK" ecc)
I'm using .net6 but a framework.net solution would be appreciated.
Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
