First off, apologies if this has already been posted. I have spent some time researching but haven't found a solution.
My goal is to access data from various JSON responses to web requests in vb.net. I am having trouble with nested responses; an example:
Dim JSON as string = '{"url2": {"href": "https://example.com/test2/"}}'
I have the classes like so:
Public Class test1
Public Class url2
Public href As String
End Class
End Class
Deserialize the JSON:
Dim objURL1 As test1 = Newtonsoft.Json.JsonConvert.DeserializeObject(Of test1)(JSON)
This seems to work correctly, however I simply do not know how to access the href
value, which is "https://example.com/test2/" in this example.