5 Feb
2010
5 Feb
'10
7:46 p.m.
Hi, I've been using the JSON writer with the property_tree. I find it difficult to write lists, since ptree::add does not allow empty paths, and that is required for the json writer to write lists. I have experimentally commented out two asserts, namely line 851, ptree_implementation.hpp: "assert(!p.empty() && "Empty path not allowed for put_child.");" line 200, string_path.hpp: "assert(!empty() && "Reducing empty path");" This is the only way that I've found to correctly write JSON lists in debug mode. Is there any way to do this without the trouble of commenting out the lines above? If not, would it not be a good thing to consider some other way to handle lists in the lib? / Gustaf