|
Boost Users : |
Subject: [Boost-users] JSON and ptree questions
From: Gustaf Johansson (gustaf.johansson_at_[hidden])
Date: 2010-02-05 14:46:43
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net