• <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 冬瓜 閱讀(2262) 評論(0)  編輯 收藏 引用 所屬分類: 原創
            99久久婷婷免费国产综合精品| 亚洲成色999久久网站| 欧美精品丝袜久久久中文字幕 | 欧美激情精品久久久久久久九九九 | 久久久久免费看成人影片| 国产精久久一区二区三区| 久久久国产打桩机| 97久久精品人人做人人爽| 久久99亚洲综合精品首页| 精品一区二区久久| 色欲久久久天天天综合网| 欧美精品国产综合久久| 国产精品亚洲美女久久久| 区久久AAA片69亚洲| 久久99精品国产一区二区三区| 精品无码久久久久久久久久 | 久久久久国产亚洲AV麻豆| 国产一级做a爰片久久毛片| 办公室久久精品| 精品国产99久久久久久麻豆| 亚洲一区中文字幕久久| 久久婷婷国产剧情内射白浆| 51久久夜色精品国产| 亚洲精品无码专区久久久| 国产一区二区精品久久岳| 日韩精品久久久久久免费| 亚洲伊人久久综合影院| 无码精品久久一区二区三区| 亚洲婷婷国产精品电影人久久| 精品免费久久久久久久| 94久久国产乱子伦精品免费| 久久天天躁狠狠躁夜夜躁2O2O| 久久综合色区| 亚洲日韩欧美一区久久久久我| 久久国产成人亚洲精品影院| 午夜不卡888久久| 国产91久久精品一区二区| 久久久久久国产精品无码超碰| 亚洲精品国产美女久久久| 无夜精品久久久久久| 久久成人小视频|