I have jquery looping through a html table and putting it into an object then using JSON.stringify to convert that javascript object to json , see json below
{
"0":{"name":"fdgd","surname":"ssdt"},
"1":{"name":"fdsf","surname":"vn"},
"2":{"name":"dfsb","surname":"mry"},
"3":{"name":"hsdsdfry","surname":"smh"}
}
My issue is with JSON.net and the CLASSs im am trying to match up for it to convert the json into my tableT object
After it does the Jsonconvert I get empty objects, can you please tell me what is wrong with my classs. Im using vb.net and .net 2. So I guess my question is how do I match my tableT class up to my json string? Thank you for the help.
Dim tableOBJ As tableT = JsonConvert.DeserializeObject(Of tableT)(myJSON)
Public Class tableT
Private _allRows As List(Of Rows)
Property AllRows As List(Of Rows)
Get
Return _allRows
End Get
Set(ByVal value As List(Of Rows))
_allRows = value
End Set
End Property
End Class
Public Class Rows
Private _name As String
Private _surname As String
Property name As String
Get
Return _name
End Get
Set(ByVal value As String)
_name = value
End Set
End Property
Property surname As String
Get
Return _surname
End Get
Set(ByVal value As String)
_surname = value
End Set
End Property
End Class