• <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)  編輯 收藏 引用 所屬分類: 原創
            人妻无码中文久久久久专区| 国产激情久久久久影院老熟女| 中文字幕精品久久| 99久久无色码中文字幕人妻| 成人久久精品一区二区三区| 久久精品国产亚洲Aⅴ蜜臀色欲| 色99久久久久高潮综合影院| 欧美精品久久久久久久自慰| 国产精品嫩草影院久久| 久久综合狠狠综合久久综合88 | 日本国产精品久久| 无码精品久久久天天影视| 狠狠色伊人久久精品综合网| 久久精品国产久精国产果冻传媒 | 中文字幕亚洲综合久久2| 午夜精品久久久久| 国产成人香蕉久久久久| 色狠狠久久AV五月综合| 亚洲中文字幕伊人久久无码| 国产精品久久久久久| 亚洲AV无码1区2区久久| 久久天天躁狠狠躁夜夜不卡| 国产精品久久久久9999| 久久婷婷五月综合国产尤物app| 亚洲精品国产第一综合99久久| 色综合久久综精品| 91精品国产高清91久久久久久| 亚洲精品国产字幕久久不卡| 亚洲午夜福利精品久久| 久久综合久久鬼色| 久久精品国产精品亚洲下载 | 日韩人妻无码精品久久久不卡| 手机看片久久高清国产日韩| 国产精品久久久天天影视香蕉| 久久精品麻豆日日躁夜夜躁| 久久久久久久波多野结衣高潮 | 精品久久久无码人妻中文字幕豆芽| 国内精品人妻无码久久久影院导航| 久久久久久亚洲精品无码| 久久高潮一级毛片免费| 26uuu久久五月天|