我有来自 http 帖子的以下 json 字符串:
Dim json As String = "{" + """contacts"":" + "[{" + """name"":""jocelyne" + """," + """mo"":""jocelyne" + """}" + ",{" + """name"":""eliane" + """," + """mo"":""12345678" + """}" + "]}"
我如何反序列化这个 json 数组?我尝试使用字典,但它不起作用请注意 json 数组的长度可能非常大
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