In order to deserialize into a DataTable
or DataSet
, Json.Net requires a very specific format as seen in this example from the documentation. Your JSON does not conform to this format, therefore it does not work. This does not mean you can't use Json.Net, it just means that you need to choose some other way to deserialize.
One way is to create strongly typed classes, and deserialize into those:
Public Class RootObject
Public Property count As Integer
Public Property results As List(Of Result)
Public Property params As Params
Public Property type As String
Public Property pagination As Pagination
End Class
Public Class Result
Public Property user_id As Integer
Public Property login_name As String
Public Property creation_tsz As Integer
Public Property referred_by_user_id As Object
Public Property feedback_info As FeedbackInfo
End Class
Public Class FeedbackInfo
Public Property count As Integer
Public Property score As Integer
End Class
Public Class Params
Public Property user_id As String
End Class
Public Class Pagination
End Class
Then:
Dim root As RootObject = JsonConvert.DeserializeObject(Of RootObject)(json)
Alterntatively, you could deserialize into a JObject
and use Json.Net's LINQ-to-JSON API to navigate and extract the data you need. Here is an example that might help with that. There are many other examples in the documentation as well as here on StackOverflow.