• <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 冬瓜 閱讀(2263) 評論(0)  編輯 收藏 引用 所屬分類: 原創
            国产亚洲精品自在久久| 超级97碰碰碰碰久久久久最新| 狠狠色噜噜色狠狠狠综合久久| 一本色道久久HEZYO无码| 久久狠狠高潮亚洲精品| 精品人妻伦九区久久AAA片69| 欧美久久亚洲精品| 国产V综合V亚洲欧美久久| 国产伊人久久| 蜜臀久久99精品久久久久久小说| 久久久久久狠狠丁香| 久久精品无码一区二区WWW| 国产69精品久久久久99| 久久婷婷色综合一区二区| 91精品国产综合久久四虎久久无码一级 | 久久人人爽人人爽人人片AV麻豆| 久久亚洲日韩看片无码| 99久久精品费精品国产| 九九久久自然熟的香蕉图片| 久久久久99精品成人片| 狠狠色丁香婷综合久久| 久久亚洲AV成人出白浆无码国产| 思思久久99热免费精品6| 亚洲欧美精品伊人久久| 69久久精品无码一区二区| 7777精品伊人久久久大香线蕉| 久久精品中文字幕一区| 国产精品久久久久久久| 久久国产欧美日韩精品| 久久亚洲精品成人av无码网站| 奇米影视7777久久精品人人爽| 久久精品国产99国产精品| 精品久久久久一区二区三区| 丰满少妇人妻久久久久久4| 久久这里只精品国产99热| 久久se精品一区精品二区| 99久久99久久久精品齐齐| 久久99国产精品二区不卡| 91精品婷婷国产综合久久| 久久精品?ⅴ无码中文字幕| 久久久久国色AV免费看图片|