• <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)  編輯 收藏 引用 所屬分類: 原創
            无码精品久久一区二区三区| 久久久久无码精品| 国内精品久久人妻互换| 狠狠色综合网站久久久久久久| 久久精品国产福利国产琪琪| 精品一二三区久久aaa片| 欧美日韩中文字幕久久伊人| 久久久久久精品免费看SSS| 久久r热这里有精品视频| 久久99精品久久久大学生| 99久久精品无码一区二区毛片| 中文字幕乱码久久午夜| 久久99精品久久久久久水蜜桃| 久久精品一本到99热免费| 无码任你躁久久久久久老妇| 久久国产精品一区二区| 婷婷久久香蕉五月综合加勒比| 久久久久亚洲精品天堂久久久久久 | 2021国产精品久久精品| 久久线看观看精品香蕉国产| 亚洲中文字幕久久精品无码APP| 久久久久亚洲AV成人网人人软件| A狠狠久久蜜臀婷色中文网| 久久久久久久波多野结衣高潮 | 久久中文字幕人妻熟av女| 国产无套内射久久久国产| 国产精品久久精品| 国产成人精品久久一区二区三区| 久久久久av无码免费网| 久久久久久精品久久久久| 一级a性色生活片久久无| 久久九九久精品国产| 久久久精品日本一区二区三区| 国产精品一区二区久久精品无码 | 老男人久久青草av高清| 亚洲精品无码久久毛片| 亚洲国产天堂久久综合| 欧美亚洲国产精品久久| 久久久无码精品亚洲日韩京东传媒 | 亚洲国产另类久久久精品黑人| 亚洲精品tv久久久久久久久 |