Trying to figure out how to use Newtonsoft with VB.net. I'm parsing a variety of information and would love to know how to separate it all.
Here's my code:
Imports Newtonsoft.Json
Imports Newtonsoft.Json.Linq
Public Module Module1
Public Sub Main()
Dim json As String = "{""name"":""Sam"",""age"":""23"",""scores"":[{""main"":12,""side"":40},{""main"":123,""side"":51}],""final"":{""test1"":0,""test2"":2}}"
Dim finalInfo = JsonConvert.DeserializeObject(Of information)(json)
Console.WriteLine(finalInfo.name)
Console.ReadKey()
End Sub
Public Class information
Public name As String
Public age As String
End Class
End Module
As you can see I'm already able to parse objects name and age but not the array scores and the object with multiple values final.
Any help with this would be deeply appreciated, thank you!