json 转换C# class(用于对接api

//说明
//使用场景:对接api,返回json结果,直接转换C# class
//如何使用:复制下面js代码在浏览器控制台执行

 

` "order_item_id": "28504637",
            "item_id": "3695819",
            "item_title": "小茵熊物料包 测试链接勿拍",
            "current_price": "999.00",
            "item_tax_fee": "0.00",
            "sku_id": null,
            "sku_name": "",
            "num": "1",
            "message": null,
            "status": "0",
            "delivery_supplier_id": "0",
            "supplier_express": null,
            "supplier_express_no": null,
            "supplier_post_fee": null,
            "supplier_cost_price": "0.00",
            "deposit_money": null,
            "item_cycle_buy_id": null,
            "goods_no": "",
            "item_url": "http://x?sid=0&detailId=3695819",
            "item_img": "http://x.png",
            "good_status": "",
            "complain_order_id": ""`.replace(/"/g,'').split(',').map(x=>'public string '+ x.split(':')[0].replace(/[\r,\n]/g,'') +'{get;set;}').join('\n')

 

posted @ 2021-11-12 16:09  212的s  阅读(208)  评论(0编辑  收藏  举报