id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 3827,Embeded null written as \0 rather than \u0000 in property_tree::write_json,Michael Anderson ,Sebastian Redl,"Here's an example {{{ #include ""boost/property_tree/json_parser.hpp"" #include ""boost/array.hpp"" int main() { boost::property_tree::ptree pt; // Some random data to encode boost::array data = { 3,0,'W','A',0,'M',255,'z' }; pt.put(""binary"", std::string(data.begin(), data.end() ) ); boost::property_tree::write_json(std::cout, pt ); } }}} This produces the output {{{ { ""binary"": ""\u0003\0WA\0M\uFFFFz"" } }}} but from the description of JSON strings at http://www.json.org/ and the more detailed version at http://www.ietf.org/rfc/rfc4627.txt it would appear that the correct encoding of the 0 character is \u00000 rather than \0 ( which is correctly handled for other non-prinatable characters. ) ",Bugs,closed,Boost 1.42.0,property_tree,Boost Development Trunk,Problem,fixed,,