1、json要改成
{
"order_list": [
{
"order_id": "Z2y2rY74ksZX1ceuGA",
"page_id": "abcedfghifk=+Uasdaseq14fadkf8123h4jk",
"trans_id": "4001562001201608292531663351",
"create_time": 123,
"pay_finish_time": 123,
"total_price": 123,
"open_id": "123",
"accepter_openid": "123",
"card_list": [
{
"card_id": "card_id_1",
"price": 123,
"code": "code_123456",
"default_gifting_msg": "",
"background_pic_url": "",
"accepter_openid": "123"
}
],
"outer_str": "web",
"IsChatRoom": true
},
{
"order_id": "Z2y2rY74ksZX1ceuGA",
"page_id": "abcedfghifk=+Uasdaseq14fadkf8123h4jk",
"trans_id": "4001562001201608292531663351",
"create_time": 123,
"pay_finish_time": 123,
"total_price": 123,
"open_id": "123",
"accepter_openid": "123",
"card_list": [
{
"card_id": "card_id_1",
"price": 123,
"code": "code_123456",
"default_gifting_msg": "",
"background_pic_url": ""
}
],
"outer_str": "web"
}
]
}
2、代码
Dim json As String = ClipBoard.GetText
Dim jo As JObject = JObject.Parse(json)
For Each jt As JToken In jo("order_list")
Output.Show(jt("order_id").ToString & "|" & jt("page_id").ToString)
For Each jt2 As object In jt("card_list")
output.show(jt2("card_id").Tostring & "|" & jt2("price").Tostring)
Next
output.show("------")
Next