首页 > 解决方案 > Json数据检索

问题描述

我已经尝试了一些方法来从 json 数组中获取我的产品详细信息。任何人都可以帮助我在 c# 中做,只是我在下面添加了我的 api 响应。从该响应中,我需要提取产品详细信息以列出。提前致谢。

API响应:{“状态”:“成功”,“结果”:[{“订单ID”:“SG20011000007”,“订单数量”:“2970”,“交付API状态”:“计划”,“oid”:“20011”, “买家”:“客人”,“shipping_address”:“{”gt_data”:“2970”,“grand1”:“2970”,“firstname”:“MANIMARAN S”,“lastname”:null,“address1”:” 408868芽笼","address2":"BBBB","zip":"408868","电话":"123","email":"svenkatesh.unipro@gmail.com","floor_no":"123", "unit_no":"123","country":"Singapore","state":null,"cities":null,"short_country":"SG"}", "vat": null, "tax_method": "default", "vat_percent": "", "shipping": "0", "payment_type": "cash_on_delivery", " payment_status": "[{"admin":"","status":"paid"}]", "discount": null, "sale_datetime": "1613360073", "delivery_status": "[{"admin":" ","status":"delivered","delivery_time":""}]", "created_datetime": "2021-02-15 09:04:33", "order_type": "shopping", "type": "交货”,“product_details”:[“{“8d7c30cf7b10b49f854c2a295a5c9413”:{“id”:”24465","qty":1,"option":"{\"color\":{\"title\":\"Color\",\"value\":null}}","price":1485 ,"name":"耳机","discount_type":"","after_coupon":0,"shipping":null,"tax":null,"image":"http:\/\/st​​oresmartstore.com\/ uni-inclusive\/uploads\/product_image\/product_24465_1_thumb.jpg","coupon":"","rowid":"8d7c30cf7b10b49f854c2a295a5c9413","subtotal":1485,"tax_percent":"0","tax_type":"百分比","tax_method":"default"}}", "{"0608bbe8fc09e0880e7d866d513c7c53":{"id":"24466","qty":1,"option":"{\"color\":{\"title\":\"Color\",\"value\":null}}","price":1485,"name":"Mobile","discount_type":"","after_coupon":0,"shipping ":null,"tax":null,"image":"http:\/\/st​​oresmartstore.com\/uni-inclusive\/uploads\/product_image\/product_24466_1_thumb.jpg","coupon":""," rowid":"0608bbe8fc09e0880e7d866d513c7c53","subtotal":1485,"tax_percent":"0","tax_type":"percent","tax_method":"default"}}" ] } ] }"图片":"http:\/\/st​​oresmartstore.com\/uni-inclusive\/uploads\/product_image\/product_24466_1_thumb.jpg","优惠券":"","rowid":"0608bbe8fc09e0880e7d866d513c7c53","小计" :1485,"tax_percent":"0","tax_type":"percent","tax_method":"default"}}" ] } ] }"图片":"http:\/\/st​​oresmartstore.com\/uni-inclusive\/uploads\/product_image\/product_24466_1_thumb.jpg","优惠券":"","rowid":"0608bbe8fc09e0880e7d866d513c7c53","小计" :1485,"tax_percent":"0","tax_type":"percent","tax_method":"default"}}" ] } ] }

标签: c#api

解决方案


推荐阅读