Re: [Boost-users] incompatible serialization format of boost::property_tree between 1.44 and 1.48 (Robert Ramey)
13 Dec
2011
13 Dec
'11
7:40 a.m.
Hi Robert, os: windows 7 compiler: visual studio 2008 sample code: #include <iostream> #include <string> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> int main() { std::string str; { std::stringstream sstr; boost::property_tree::ptree pt; char a= '\0'; pt.put("a",a); boost::property_tree::write_json(sstr, pt); str = sstr.str(); std::cout << str << std::endl; } { std::stringstream sstr(str); boost::property_tree::ptree pt; boost::property_tree::read_json(sstr, pt); char a = '\1'; std::cout << (int)pt.get("a",a) << std::endl; } return 0; }
4665
Age (days ago)
4665
Last active (days ago)
0 comments
1 participants
participants (1)
-
kpzhang