• <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++博客 :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
              163 Posts :: 7 Stories :: 135 Comments :: 0 Trackbacks

            常用鏈接

            留言簿(28)

            我參與的團隊

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

            因為要用到調(diào)試json的解析結(jié)果,所以在這里寫了一個,結(jié)果近似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)  編輯 收藏 引用 所屬分類: 原創(chuàng)
            亚洲国产成人久久综合一| 国产精品久久久香蕉| 一本久久a久久精品综合夜夜 | 一级做a爰片久久毛片毛片| 久久精品视频一| 久久精品国产第一区二区三区| 好属妞这里只有精品久久| 久久久WWW成人免费毛片| 伊人久久精品无码二区麻豆| 久久久久久免费一区二区三区| 久久人人超碰精品CAOPOREN| 亚洲精品美女久久久久99| 国产精品美女久久久久AV福利| 久久人人爽人人爽人人爽| 久久精品成人一区二区三区| 亚洲国产精品无码成人片久久| 久久精品中文字幕一区| 久久精品www人人爽人人| 国产精品99久久久精品无码 | 国产精品99久久精品| 伊人久久无码中文字幕| 久久久久久久综合日本| 久久久久综合网久久| 色欲综合久久中文字幕网| 色青青草原桃花久久综合| 99久久精品无码一区二区毛片| 久久婷婷五月综合97色一本一本| 思思久久好好热精品国产| 久久亚洲中文字幕精品一区| 亚洲成人精品久久| 天天爽天天爽天天片a久久网| 久久亚洲精品成人av无码网站| 伊人久久大香线蕉综合5g| 色8激情欧美成人久久综合电| 久久久WWW成人免费毛片| 久久亚洲精品无码播放| 久久久久国产一区二区| 亚洲伊人久久综合影院| 国内精品久久久久久久久电影网 | 亚洲中文久久精品无码| 中文字幕精品无码久久久久久3D日动漫|