I'm moving first step on json and i have a problem. By Newtonsoft.Json.JsonConvert.DeserializeObject i put data in my class My_visitors where i have : Public Property code As String Public Property msg As String Public Property time As String Public Property data As MyItemVisitots
Public Class MyItemVisitors
Public Property id As String
Public Property Uuid As String
End Class
After i create my table ( i need it just for MyItemVisitors )
Dim myObject As MyObject_Visitatori = Me Dim myitem As MyItemVisitatori myitem = myObject.data Dim properties As PropertyDescriptorCollection = TypeDescriptor.GetProperties(GetType(MyItemVisitatori)) 'MyItemToken
Dim table As DataTable = New DataTable("DTable")
For Each prop As PropertyDescriptor In properties table.Columns.Add(prop.Name, If(Nullable.GetUnderlyingType(prop.PropertyType), prop.PropertyType)) Next
Now i have problem to populate this table. How can i do ?
is there a shorter way to deserialize a json and put data in a table ? Thank you
Luca