Get value from json using ptree in c++ if key name is with dots(.) -


i tried using ptree fetch value of key in c++ key name having multiple . in keys.

so have json,

"product": {     "product.description.text": "some text here" } 

i tried calling

std::string product = pt.get_value("product.product.description.text"); 

but can't value. please me

according http://www.boost.org/doc/libs/1_43_0/doc/html/boost_propertytree/accessing.html may use following:

pt.get<std::string>('/', "product/product.description.text"); 

Comments