id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5210,JSON writer does not allow attributes and children in the same node,Christian Ceelen ,Sebastian Redl,"The JSON serialization of property_tree is currently restricts to instances of property_tree that do contain data attributes only in leaf node. {{{#!C++ // Verify if ptree does not contain information that cannot be written to json template bool verify_json(const Ptree &pt, int depth) { typedef typename Ptree::key_type::value_type Ch; typedef typename std::basic_string Str; // Root ptree cannot have data if (depth == 0 && !pt.template get_value().empty()) return false; // Ptree cannot have both children and data if (!pt.template get_value().empty() && !pt.empty()) return false; // Check children typename Ptree::const_iterator it = pt.begin(); for (; it != pt.end(); ++it) if (!verify_json(it->second, depth + 1)) return false; // Success return true; } }}} To me this is a random limitation. I removed it locally and tried to generate an instance with attributes and children: {{{ { ""Object"":{ ""Name"": ""Object Name"", ""Child"": { ""Name"": ""Child Name"" } } } }}} It works well. Why is this policy built into the json writer? Why is there no way to deactivate this policy? ",Bugs,closed,To Be Determined,property_tree,Boost 1.46.0,Problem,invalid,,