i fixed it :
i'm trying to deserialize the JSON string into a Dictionary which should represent an object, but my JSON string contains an array of two objects instead of a single object.
So ishould use List(Of Dictionary(Of String, String)) instead of Dictionary(Of String, String):
Sub Main
Dim json As String = "[{" + """name"":""jocelyne" + """," + """mo"":""jocelyne" + """}" + ",{" + """name"":""eliane" + """," + """mo"":""12345678" + """}" + "]"
Dim deserializedProduct As List(Of Dictionary(Of String, String)) = JsonConvert.DeserializeObject(Of List(Of Dictionary(Of String, String)))(json)
deserializedProduct.Dump()
End Sub
If i want a DataTable, i just use
Sub Main
Dim json As String = "[{" + """name"":""jocelyne" + """," + """mo"":""jocelyne" + """}" + ",{" + """name"":""eliane" + """," + """mo"":""12345678" + """}" + "]"
Dim table As DataTable = JsonConvert.DeserializeObject(Of DataTable)(json)
table.Dump()
End Sub