diff options
Diffstat (limited to 'src/ptree.cc')
-rw-r--r-- | src/ptree.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/ptree.cc b/src/ptree.cc index 5f7b5766..ca343072 100644 --- a/src/ptree.cc +++ b/src/ptree.cc @@ -74,7 +74,14 @@ void format_ptree::flush() put_post(pt, *post); } - property_tree::write_xml(out, pt); + switch (format) { + case FORMAT_XML: + property_tree::write_xml(out, pt); + break; + case FORMAT_JSON: + property_tree::write_json(out, pt); + break; + } } void format_ptree::operator()(post_t& post) |