• <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专区| 性欧美丰满熟妇XXXX性久久久 | 久久一区二区三区免费| 亚洲国产成人久久综合一区77| A级毛片无码久久精品免费| 久久免费线看线看| 亚洲AV日韩精品久久久久久久| 久久亚洲国产欧洲精品一| 久久这里只精品99re66| 久久人妻少妇嫩草AV无码专区| 精品国产91久久久久久久a| 久久精品毛片免费观看| 一本色综合久久| 色噜噜狠狠先锋影音久久| 一本色综合网久久| 久久精品国产福利国产琪琪| 91视频国产91久久久| 精品熟女少妇AV免费久久| 久久久久99精品成人片牛牛影视| 久久av无码专区亚洲av桃花岛| 亚洲精品成人久久久| 国产成人精品久久亚洲高清不卡| 人妻无码αv中文字幕久久琪琪布 人妻无码久久一区二区三区免费 人妻无码中文久久久久专区 | 久久久久久久91精品免费观看 | 中文精品久久久久人妻| 久久久中文字幕日本| 国产69精品久久久久99| 66精品综合久久久久久久| 99久久免费国产特黄| 国产69精品久久久久777| 久久国产乱子伦免费精品| 日韩久久久久久中文人妻| 99国产欧美精品久久久蜜芽| 久久夜色精品国产噜噜噜亚洲AV| 亚洲va久久久噜噜噜久久男同| 无码精品久久久天天影视| 精品综合久久久久久98| 久久www免费人成看片|