diff options
author | John Wiegley <johnw@newartisans.com> | 2012-05-18 01:38:39 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-05-18 01:38:39 -0600 |
commit | 7e8ba51cd0fc94776b8f687736202a25ddc39f15 (patch) | |
tree | 373ec4d59af7a14d3519f0c18063e61e41cf8ec9 /src/ptree.cc | |
parent | a38ed141c1f33ecdad99b322acb1ae07b30a5da2 (diff) | |
download | fork-ledger-7e8ba51cd0fc94776b8f687736202a25ddc39f15.tar.gz fork-ledger-7e8ba51cd0fc94776b8f687736202a25ddc39f15.tar.bz2 fork-ledger-7e8ba51cd0fc94776b8f687736202a25ddc39f15.zip |
Added a "json" report command
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) |