Boost C++ Libraries: Ticket #7088: Error with property_tree https://svn.boost.org/trac10/ticket/7088 <p> json { </p> <blockquote> <p> cool : <a class="missing wiki">hp</a> </p> </blockquote> <p> } </p> <p> I have Simple example: typedef boost::property_tree::basic_ptree&lt; string_t, string_t &gt; ptree; boost::property_tree::json_parser::read_json("path_out", pt); ptree pt; </p> <p> auto result = pt.get_child(_T("cool")); result.add(_T(" "), _T("33333")); </p> <p> std::for_each(result.begin(), result.end(), [&amp;](ptree::value_type const&amp; val) { </p> <blockquote> <p> std::wcout &lt;&lt; val.first &lt;&lt; _T(" ") &lt;&lt; val.second.data() &lt;&lt; std::endl; </p> </blockquote> <p> }); </p> <p> pt.put_child(_T("cool"), result); boost::property_tree::json_parser::write_json("path_out", pt); </p> <p> i have: </p> <p> json { </p> <blockquote> <p> cool : </p> <blockquote> <p> { </p> <blockquote> <p> "": "hp", " ": "33333" </p> </blockquote> <p> } </p> </blockquote> </blockquote> <p> } </p> <p> Why. I need array </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7088 Trac 1.4.3 viboes Wed, 15 Aug 2012 19:45:26 GMT component changed; owner set https://svn.boost.org/trac10/ticket/7088#comment:1 https://svn.boost.org/trac10/ticket/7088#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Sebastian Redl</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">property_tree</span> </li> </ul> Ticket Sebastian Redl Thu, 22 Jan 2015 15:48:20 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7088#comment:2 https://svn.boost.org/trac10/ticket/7088#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> All keys must be empty for the node to be treated as an array. In your case, your key is a single space. </p> Ticket