When I use the function AddMember from the c++ library RapidJson and I use string as parameters
Everything Work fine
jsvalue.AddMember("Fare", "0", allocator);
but when I try to use a Function of RapidXml as parameter to get the node name, I get a fatal error
std::cout << "name : " << xmlnode_chd->name() << " value : " << xmlnode_chd->first_node()->value() << std::endl;
jsvalue.AddMember(std::string(xmlnode_chd->name()), std::string(xmlnode_chd->first_node()->value()), allocator);
xmlnode_chd->name() return a char*, that's why I cast it to string
This is the error message I get :
/home/otf/test/./include/xml2json.hpp|210|error: no matching function for call to ‘rapidjson::GenericValue >::AddMember(std::string, std::string, rapidjson::GenericDocument >::AllocatorType&)’|