Link In this link is a fix for the problem.
It involves changing boost code, because of that I tried another alternative. My solution involves regular expressions:
std::string JSONObject::toString() const
{
boost::regex exp("\"(null|true|false|[0-9]+(\\.[0-9]+)?)\"");
std::stringstream ss;
boost::property_tree::json_parser::write_json(ss, *pt);
std::string rv = boost::regex_replace(ss.str(), exp, "$1");
return rv;
}
Basically I search for the keywords: true, false, null and any type of number. The matches are replaced with the same without quotes.