• <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 冬瓜 閱讀(2267) 評論(0)  編輯 收藏 引用 所屬分類: 原創
            亚洲精品tv久久久久| 97久久综合精品久久久综合| 久久久久久久久久久久中文字幕 | 狠狠人妻久久久久久综合蜜桃 | 国产精品久久久久一区二区三区| 久久精品国产精品亚洲| 亚洲精品无码久久久久| 狠狠色丁香婷婷综合久久来来去| 久久久亚洲精品蜜桃臀| yellow中文字幕久久网| 2021国内久久精品| 老司机国内精品久久久久| 久久精品一区二区三区AV| 香蕉aa三级久久毛片| 久久免费视频观看| 久久久久久久91精品免费观看| 国产—久久香蕉国产线看观看| 漂亮人妻被中出中文字幕久久 | 国产精品视频久久| 久久热这里只有精品在线观看| 97超级碰碰碰碰久久久久| 国产激情久久久久影院老熟女| 久久久久亚洲AV成人网人人网站| 99久久精品免费看国产免费| 久久精品国产第一区二区三区| 一级女性全黄久久生活片免费| 丁香久久婷婷国产午夜视频| 欧美大香线蕉线伊人久久| 国产一区二区三区久久| 久久精品国产亚洲av高清漫画 | av国内精品久久久久影院| 久久精品无码午夜福利理论片 | 久久综合久久自在自线精品自| 久久久久久久精品成人热色戒| 亚洲第一永久AV网站久久精品男人的天堂AV | 久久这里只有精品18| 婷婷久久久亚洲欧洲日产国码AV| 久久人人爽人人爽人人片AV高清 | 亚洲国产精品久久| 天天久久狠狠色综合| 国产视频久久|