Hallo!
Ich bekomme über ein WebRequest einen String im JSON-Format zurück!
Ich habe mir jetzt schon eine Klasse mit Properties erstellt um auf die einzelnen Werte zuzugreifen.
Wie kann ich mir jetzt aus dem String ein Treeview erstellen, oder gar ein DataTable?
Der JSON-String hat mehrere Bereiche, hier mal die Klasse:
Spoiler anzeigen
Newtonsoft.JSON hab ich installiert!
Ich bekomme über ein WebRequest einen String im JSON-Format zurück!
Ich habe mir jetzt schon eine Klasse mit Properties erstellt um auf die einzelnen Werte zuzugreifen.
Wie kann ich mir jetzt aus dem String ein Treeview erstellen, oder gar ein DataTable?
Der JSON-String hat mehrere Bereiche, hier mal die Klasse:
VB.NET-Quellcode
- Public Class Artist
- Public Property id As String
- Public Property name As String
- Public Property joinphrase As String
- End Class
- Public Class Track
- Public Property position As Integer
- Public Property artists As Artist()
- Public Property id As String
- Public Property title As String
- End Class
- Public Class Medium
- Public Property position As Integer
- Public Property tracks As Track()
- Public Property track_count As Integer
- Public Property format As String
- Public Property title As String
- End Class
- Public Class Release
- Public Property mediums As Medium()
- Public Property id As String
- End Class
- Public Class Releasegroup
- Public Property id As String
- Public Property releases As Release()
- End Class
- Public Class Recording
- Public Property sources As Integer
- Public Property releasegroups As Releasegroup()
- Public Property id As String
- End Class
- Public Class Result
- Public Property recordings As Recording()
- Public Property score As Double
- Public Property id As String
- End Class
- Public Class c_JSON_ROOT
- Public Property status As String
- Public Property results As Result()
- End Class
Newtonsoft.JSON hab ich installiert!