• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            專職C++

            不能停止的腳步

              C++博客 :: 首頁 :: 聯系 :: 聚合  :: 管理
              163 Posts :: 7 Stories :: 135 Comments :: 0 Trackbacks

            常用鏈接

            留言簿(28)

            我參與的團隊

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            因為要用到調試json的解析結果,所以在這里寫了一個,結果近似json格式

            void PrintJsonList(const string & paramPre, Json::Value & paramValue)
            {
                Json::Value::Members mem = paramValue.getMemberNames();  
                for (auto iter = mem.begin(); iter != mem.end(); iter++)  
                {  
                    cout<<paramPre<<"\""<<*iter<<"\":";  
                    if (paramValue[*iter].type() == Json::objectValue)  
                    {  
                        cout<<paramPre<<"{"<<endl;  
                        PrintJsonList(paramPre + "   ", paramValue[*iter]);  
                        cout<<paramPre<<"},"<<endl;
                    }  
                    else if (paramValue[*iter].type() == Json::arrayValue)  
                    {  
                        cout<<paramPre<<"["<<endl;  
                        auto cnt = paramValue[*iter].size();  
                        for (auto i = 0; i < cnt; i++)  
                        {  
                            Json::Value & pElem = paramValue[*iter][i];
                            if (pElem.type() == Json::arrayValue)
                            {
                                cout <<paramPre<< "["<<endl;
                                PrintJsonList(paramPre + "   ", pElem);  
                                cout <<paramPre<< "],"<<endl;
                            }
                            else if (pElem.type() == Json::objectValue)
                            {
                                cout <<paramPre<< "{"<<endl;
                                PrintJsonList(paramPre + "   ", pElem);  
                                cout <<paramPre<< "},"<<endl;
                            }
                            else PrintJsonList(paramPre + "   ", pElem);  
                        }  
                        cout<<paramPre<<"]"<<endl;  
                    }  
                    else if (paramValue[*iter].type() == Json::stringValue)  
                    {  
                        cout<<"\""<<paramValue[*iter].asString()<<"\""<<endl;  
                    }  
                    else if (paramValue[*iter].type() == Json::realValue)  
                    {  
                        cout<<paramValue[*iter].asDouble()<<endl;  
                    }  
                    else if (paramValue[*iter].type() == Json::uintValue)  
                    {  
                        cout<<paramValue[*iter].asUInt()<<endl;  
                    }  
                    else
                    {  
                        cout<<paramValue[*iter].asInt()<<endl;  
                    }  
                }  
                return;  
            }
            posted on 2014-04-29 16:30 冬瓜 閱讀(2273) 評論(0)  編輯 收藏 引用 所屬分類: 原創
            欧美日韩精品久久久免费观看| 久久免费小视频| 三级韩国一区久久二区综合| 国产午夜电影久久| 久久精品无码av| 日韩AV毛片精品久久久| 亚洲精品美女久久久久99小说| 欧洲性大片xxxxx久久久| 久久国产劲爆AV内射—百度| 久久亚洲私人国产精品| 国产精品久久久久久| 久久www免费人成看国产片 | 久久九九全国免费| 久久亚洲国产精品123区| 久久婷婷五月综合成人D啪| 久久精品午夜一区二区福利| 久久噜噜电影你懂的| 色婷婷噜噜久久国产精品12p| 久久亚洲精精品中文字幕| 国产视频久久| 久久AV高清无码| 亚洲一级Av无码毛片久久精品| 精品久久一区二区| 欧美午夜精品久久久久久浪潮| 热久久国产精品| 国产一区二区精品久久| 久久国产精品无码HDAV| 久久香蕉国产线看观看精品yw| 久久久噜噜噜久久中文字幕色伊伊| 久久久久亚洲AV成人网人人软件| 久久国产精品-久久精品| 久久99精品综合国产首页| 久久永久免费人妻精品下载| 久久综合狠狠综合久久| 日日躁夜夜躁狠狠久久AV| 久久久久久精品免费看SSS | …久久精品99久久香蕉国产| 国产成年无码久久久免费| 中文无码久久精品| 国产亚洲欧美精品久久久 | 久久久久久久久久久久久久|