解析json字符串

Dim s As String = "{'status':'S','errMsg':null,'vouchers':[{'id':'MmZhQwSuT+SJHMi1jHph3yZS4B4\u003d','number':'收-0005'}]}"







        Dim jsonData As Object = CType(JsonConvert.DeserializeObject(s), JObject)

        Dim jobject As JObject = JsonConvert.DeserializeObject(s)




        If jsonData("vouchers").count <> 0 Then

            For i As Integer = jsonData("vouchers").count - 1 To 0 Step -1

                Dim sFNum As String = jsonData("vouchers").item(i)("number").ToString()

                Dim sEASFID As String = jsonData("vouchers").item(i)("id").ToString()

            Next

        End If

 

posted @ 2016-07-31 11:00  飘....  阅读(210)  评论(0编辑  收藏  举报