Bwar / CJsonObject

Ultralightweight JSON parser in C++ based on cJSON
MIT License
648 stars 239 forks source link

遍历 #58

Closed task8 closed 1 month ago

task8 commented 1 year ago

请问如何遍历所有key和value 包括数组中的值

Bwar commented 1 year ago

demo.cpp里就有

std::string strTraversing;
     while(oJson["dynamic_loading"][0].GetKey(strTraversing))
     {
         std::cout << "traversing:  " << strTraversing << std::endl;
     }