i'm trying to read a json string from an http post, i'm trying to test my code by filling the json string manually but my problem is that i'm not able to add the same node many times.... in other words if i put the following it works:
Dim json As String = "{'name': 'jocelyne','mo': '70274724'}
but if i put the following it does not work:
Dim json As String = "{'name': 'jocelyne','mo': '70274724'},{'name': 'eliane','mo': '12345678'}"
and i actually have hundred of names and mo numbers that will be sent to me in a json string
this is my entire code:
Request.InputStream.Position = 0
Dim inputStream As New StreamReader(Request.InputStream)
Dim json As String = "{'name': 'jocelyne','mo': '70274724'},{'name': 'eliane','mo': '12345678'}"
Dim jss As New System.Web.Script.Serialization.JavaScriptSerializer()
Dim dict As Dictionary(Of String, String) = jss.Deserialize(Of Dictionary(Of String, String))(json)
For Each item As KeyValuePair(Of String, String) In dict
Response.Write(item.Key & " - " & item.Value & "<br>")
Next
so how can i fix this? i just need to be able to read this json format given to me using http post and deserialize it to read the data