淘宝(阿里百川)手机客户端开发日记第十五篇 JSON解析(四)

时间:2021-02-06 16:43:51
解析一个从淘宝传递的JSON (大家如有兴趣可以测试下):{
    "tae_item_detail_get_response":
    {
        "data":
        {
            "coupon_info":{
                "shop_coupon":"false"
            },
            "desc_info":
            {
                "content":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<wapDesc><img size=\"57744\">http:\/\/img.alicdn.com\/imgextra\/i2\/1716037031\/TB2VHOHdFXXXXaKXpXXXXXXXXXX-1716037031.jpg<\/img><img size=\"85069\">http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB2df1FbFXXXXXaXpXXXXXXXXXX-1716037031.jpg<\/img><txt>!!!!特大惊喜!!!!\r\n\r\n全部新升级版不只是充电宝手机,现在还能上微信 QQ各大时尚功能集于一身。此次升级还升级了电池。容量增加至5400毫安,超强续航。超长待机60天,手电筒不用开机就可以使用了。超强光束。\r\n\r\n!!!!加量不加价!!!\r\n\r\n更不用担心天天充电,采用防摔减震材质,德国密封技术,怎么摔都不怕坏。还有一键强光手电筒,雅马哈密封音响震撼喇叭,收音机,您一定爱不释手,最大的特点可以帮您的苹果三星手机彩充电哦。可为苹果4手机充满3次。无线续航您的爱机。!<\/txt><txt>套餐详情介绍:\r\n\r\n官方标配:手机+电池X1(5800毫安)+充电器+数据线+耳机+包装\r\n\r\n套餐一:手机+电池X1(5800毫安)+充电器+数据线+耳机+包装+2G卡\r\n\r\n套餐二:手机+电池X1(5800毫安)+充电器+数据线+耳机+包装+4G卡\r\n\r\n套餐三:手机+电池X2(5800毫安)+充电器+数据线+耳机+包装+8G卡 \r\n\r\n套餐四:手机+电池X1(5800毫安)+充电器+数据线+耳机+包装<\/txt><img size=\"53608\">http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2lTSHbFXXXXbxXXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"93991\">http:\/\/img01.taobaocdn.com\/imgextra\/i1\/1716037031\/TB2XtqGbFXXXXcvXXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"73470\">http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2n2_7XVXXXXc_XpXXXXXXXXXX-1716037031.jpg<\/img><img size=\"81937\">http:\/\/img04.taobaocdn.com\/imgextra\/i4\/1716037031\/TB2Gg9GbFXXXXckXXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"133268\">http:\/\/img04.taobaocdn.com\/imgextra\/i4\/1716037031\/TB2nAqJbFXXXXc5XXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"42087\">http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2_RqEbFXXXXbXXpXXXXXXXXXX-1716037031.jpg<\/img><img size=\"43238\">http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB27xuGbFXXXXbSXXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"42743\">http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB24UYeXFXXXXbUXpXXXXXXXXXX-1716037031.jpg<\/img><img size=\"53132\">http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2BcyEbFXXXXbNXXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"44266\">http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2NxiuXVXXXXaPXpXXXXXXXXXX-1716037031.jpg<\/img><img size=\"55935\">http:\/\/img01.taobaocdn.com\/imgextra\/i1\/1716037031\/TB2xjaGbFXXXXbzXXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"52260\">http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB2ufqeXVXXXXa8XpXXXXXXXXXX-1716037031.jpg<\/img><img size=\"100410\">http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB2Ct5FbFXXXXc.XXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"33728\">http:\/\/img04.taobaocdn.com\/imgextra\/i4\/1716037031\/TB2.bSHbFXXXXbdXXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"69849\">http:\/\/img04.taobaocdn.com\/imgextra\/i4\/1716037031\/TB28FuGbFXXXXb0XXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"75694\">http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB2y_SIbFXXXXX8XXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"74957\">http:\/\/img04.taobaocdn.com\/imgextra\/i4\/1716037031\/TB23bCGbFXXXXbaXpXXXXXXXXXX-1716037031.jpg<\/img><img size=\"71226\">http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB2kcaGbFXXXXbUXXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"64402\">http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2sR9HbFXXXXboXXXXXXXXXXXX-1716037031.jpg<\/img><img size=\"65372\">http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB280CGbFXXXXbGXXXXXXXXXXXX-1716037031.jpg<\/img><\/wapDesc>",
                "type":"mobile"
            },
            "item_buy_info":
            {
                "cart_support":"true"
            },
            "item_info":
            {
                "in_sale":"true",
                "item_props":
                {
                    "item_property":
                        [
                            {"name":"CPU品牌","value":"ARM"},
                            {"name":"型号","value":"其他"},
                            {"name":"品牌","value":"100+"},
                            {"name":"型号","value":"100C"},
                            {"name":"上市时间","value":"2014年"},
                            {"name":"网络类型","value":"移动2G\/联通2G"},
                            {"name":"款式","value":"直板"},
                            {"name":"尺寸","value":"2.8英寸"},
                            {"name":"机身颜色","value":"黑色,红色,桔色,绿色,天蓝色"},
                            {"name":"套餐类型","value":"官方标配"},
                            {"name":"后置摄像头","value":"30万"},
                            {"name":"操作系统","value":"无操作系统"},
                            {"name":"附加功能","value":"双卡双待"},
                            {"name":"宝贝成色","value":"全新"},
                            {"name":"售后服务","value":"店铺三包"},
                            {"name":"触摸屏类型","value":"非触摸屏"},
                            {"name":"机身内存","value":"4MB"},
                            {"name":"键盘类型","value":"12键标准键盘"},
                            {"name":"厚度","value":"1CM以上"},
                            {"name":"分辨率","value":"160X128"},
                            {"name":"手机类型","value":"时尚手机,老人手机"},
                            {"name":"电池类型","value":"可拆卸式电池"},
                            {"name":"摄像头类型","value":"单摄像头"},
                            {"name":"视频显示格式","value":"其他"},
                            {"name":"网络模式","value":"双卡双模"},
                            {"name":"核心数","value":"无"},
                            {"name":"版本类型","value":"*"}
                        ]
                },
                "pics":
                {
                    "string":
                        [
                            "http:\/\/img.alicdn.com\/bao\/uploaded\/i4\/TB1Q3eoIpXXXXbCXFXXXXXXXXXX_!!0-item_pic.jpg",
                            "http:\/\/img.alicdn.com\/bao\/uploaded\/i4\/1716037031\/TB2yn7AcFXXXXcaXXXXXXXXXXXX_!!1716037031.jpg",
                            "http:\/\/img.alicdn.com\/bao\/uploaded\/i4\/1716037031\/TB28XWJdFXXXXXjXXXXXXXXXXXX_!!1716037031.jpg",
                            "http:\/\/img.alicdn.com\/bao\/uploaded\/i4\/1716037031\/TB2GK3GcFXXXXaBXXXXXXXXXXXX_!!1716037031.jpg",
                            "http:\/\/img.alicdn.com\/bao\/uploaded\/i2\/1716037031\/TB2fyZBcFXXXXb_XXXXXXXXXXXX_!!1716037031.jpg"
                        ]
                },
                "sku_item":"true",
                "start":"1429063200000",
                "sub_title":"手 电 筒 LED远射强光。喇 叭 密封震撼立体音响效果。功能齐全,拨号语音 来电报号 照相 收音机 手机 微信 QQ 浏览器 音乐播放器 视频播放器。不仅是一款手机还是一款充电宝哦。可以给您的手机,小伙伴的手机无线续航哦。!保修两年,十五天无理由退换货,妈妈不喜欢退。狗狗不喜欢退。售后无忧",
                "title":"【天天特价】三防路虎老人手机超长待机双卡直板T600户外微信正品"
            },
            "mobile_desc_info":
            {
                "desc_list":
                {
                    "desc_fragment":
                        [
                            {"content":"http:\/\/img.alicdn.com\/imgextra\/i2\/1716037031\/TB2VHOHdFXXXXaKXpXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB2df1FbFXXXXXaXpXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"!!!!特大惊喜!!!! 全部新升级版不只是充电宝手机,现在还能上微信 QQ各大时尚功能集于一身。此次升级还升级了电池。容量增加至5400毫安,超强续航。超长待机60天,手电筒不用开机就可以使用了。超强光束。 !!!!加量不加价!!! 更不用担心天天充电,采用防摔减震材质,德国密封技术,怎么摔都不怕坏。还有一键强光手电筒,雅马哈密封音响震撼喇叭,收音机,您一定爱不释手,最大的特点可以帮您的苹果三星手机彩充电哦。可为苹果4手机充满3次。无线续航您的爱机。!","label":"txt"},
                            {"content":"套餐详情介绍: 官方标配:手机+电池X1(5800毫安)+充电器+数据线+耳机+包装 套餐一:手机+电池X1(5800毫安)+充电器+数据线+耳机+包装+2G卡 套餐二:手机+电池X1(5800毫安)+充电器+数据线+耳机+包装+4G卡 套餐三:手机+电池X2(5800毫安)+充电器+数据线+耳机+包装+8G卡 套餐四:手机+电池X1(5800毫安)+充电器+数据线+耳机+包装","label":"txt"},
                            {"content":"http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2lTSHbFXXXXbxXXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img01.taobaocdn.com\/imgextra\/i1\/1716037031\/TB2XtqGbFXXXXcvXXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2n2_7XVXXXXc_XpXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img04.taobaocdn.com\/imgextra\/i4\/1716037031\/TB2Gg9GbFXXXXckXXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img04.taobaocdn.com\/imgextra\/i4\/1716037031\/TB2nAqJbFXXXXc5XXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2_RqEbFXXXXbXXpXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB27xuGbFXXXXbSXXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB24UYeXFXXXXbUXpXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2BcyEbFXXXXbNXXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2NxiuXVXXXXaPXpXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img01.taobaocdn.com\/imgextra\/i1\/1716037031\/TB2xjaGbFXXXXbzXXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB2ufqeXVXXXXa8XpXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB2Ct5FbFXXXXc.XXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img04.taobaocdn.com\/imgextra\/i4\/1716037031\/TB2.bSHbFXXXXbdXXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img04.taobaocdn.com\/imgextra\/i4\/1716037031\/TB28FuGbFXXXXb0XXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB2y_SIbFXXXXX8XXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img04.taobaocdn.com\/imgextra\/i4\/1716037031\/TB23bCGbFXXXXbaXpXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB2kcaGbFXXXXbUXXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img03.taobaocdn.com\/imgextra\/i3\/1716037031\/TB2sR9HbFXXXXboXXXXXXXXXXXX-1716037031.jpg","label":"img"},
                            {"content":"http:\/\/img02.taobaocdn.com\/imgextra\/i2\/1716037031\/TB280CGbFXXXXbGXXXXXXXXXXXX-1716037031.jpg","label":"img"}
                        ]
                }
            },
            "price_info":
            {
                "item_price":
                {
                    "price":
                    {
                        "name":"价格",
                        "price":"688.00"
                    },
                    "promotion_price":
                    {
                        "name":"天天特价",
                        "price":"115.00"
                    }
                },
                "sku_price_list":
                {
                    "sku_price_item":
                    [
                        {"price":{"name":"价格","price":"688.00"},"promotion_price":{"name":"天天特价","price":"115.00"},"sku_id":"76293838076"},
                        {"price":{"name":"价格","price":"688.00"},"promotion_price":{"name":"天天特价","price":"115.00"},"sku_id":"76293838080"},
                        {"price":{"name":"价格","price":"688.00"},"promotion_price":{"name":"天天特价","price":"115.00"},"sku_id":"76293838084"},
                        {"price":{"name":"价格","price":"688.00"},"promotion_price":{"name":"天天特价","price":"115.00"},"sku_id":"76293838088"},
                        {"price":{"name":"价格","price":"688.00"},"promotion_price":{"name":"天天特价","price":"115.00"},"sku_id":"76293838092"}
                    ]
                }
            },
            "rate_info":
            {
                "rate_list":
                {
                    "rate_item":
                    [
                        {"feedback":"刚拿到手机又掉价了","nick":"z**4"},
                        {"feedback":"出门刚回来评价晚了","nick":"z**4"},
                        {"feedback":"货很好,电板够大","nick":"8**c"},
                        {"feedback":"货很好,电板够大","nick":"8**c"},
                        {"feedback":"货很好,电板够大","nick":"8**c"},
                        {"feedback":"","nick":"a**2"},
                        {"feedback":"迷糊","nick":"蓝**c"},
                        {"feedback":"不理想","nick":"周**3"},
                        {"feedback":"","nick":"陈**4"},
                        {"feedback":"","nick":"l**0"}
                    ]
                }
            },
            "seller_info":
            {
                "seller_nick":"淘我所爱来来",
                "seller_type":"taobao",
                "shop_name":"金网时代"
            },
            "sku_info":
            {
                "pv_map_sku_list":
                {
                    "pv_map_sku":
                    [
                        {"pv":"1627207:28326;5919063:6536025;12304035:21518;122216431:27772","sku_id":"76293838076"},
                        {"pv":"1627207:28341;5919063:6536025;12304035:21518;122216431:27772","sku_id":"76293838080"},
                        {"pv":"1627207:90554;5919063:6536025;12304035:21518;122216431:27772","sku_id":"76293838084"},
                        {"pv":"1627207:28335;5919063:6536025;12304035:21518;122216431:27772","sku_id":"76293838088"},
                        {"pv":"1627207:3232484;5919063:6536025;12304035:21518;122216431:27772","sku_id":"76293838092"}
                    ]
                },
                "sku_props":
                {
                    "sku_property":
                    [
                        {"prop_id":"1627207","prop_name":"机身颜色","values":{"sku_property_value":[{"name":"红色","value_id":"28326"},{"name":"黑色","value_id":"28341"},{"name":"桔色","value_id":"90554"},{"name":"绿色","value_id":"28335"},{"name":"天蓝色","value_id":"3232484"}]}},
                        {"prop_id":"5919063","prop_name":"套餐类型","values":{"sku_property_value":[{"name":"官方标配","value_id":"6536025"}]}},
                        {"prop_id":"12304035","prop_name":"机身内存","values":{"sku_property_value":[{"name":"4MB","value_id":"21518"}]}},
                        {"prop_id":"122216431","prop_name":"版本类型","values":{"sku_property_value":[{"name":"*","value_id":"27772"}]}}
                    ]
                }
            },
            "stock_info":
            {
                "item_quantity":"288",
                "sku_quantity_list":
                {
                    "sku_quantity":
                    [
                        {"quantity":"60","sku_id":"76293838076"},
                        {"quantity":"55","sku_id":"76293838080"},
                        {"quantity":"58","sku_id":"76293838084"},
                        {"quantity":"59","sku_id":"76293838088"},
                        {"quantity":"56","sku_id":"76293838092"}
                    ]
                }
            }
        },
        "request_id":"zt90ye11rlq9"
    }
}