6 pybind11::object keys = pybind11::list(dict.attr(
"keys")());
7 std::vector<std::string> keysCpp = keys.cast<std::vector<std::string>>();
9 for(
auto& key : keysCpp){
12 if(pybind11::isinstance<pybind11::dict>(dict.attr(
"get")(key))){
16 }
else if(pybind11::isinstance<pybind11::list>(dict.attr(
"get")(key))){
18 for(
auto comp : pybind11::list(dict.attr(
"get")(key)))
19 val +=
"," + std::string(pybind11::str(comp));
20 pt.put(basePath + key, val.substr(1));
24 pt.put(basePath + key, pybind11::str(dict.attr(
"get")(key)));
31 boost::property_tree::ptree pt;
void AddDictToPtree(pybind11::dict dict, std::string basePath, boost::property_tree::ptree &pt)
boost::property_tree::ptree ConvertDictToPtree(pybind11::dict dict)