From 8ad29bded737fa1a20d50fac9f8a1a453576046a Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 1 Nov 2013 17:35:35 -0400 Subject: [PATCH] Bug #1381 - #1381 Invalid JSON exported by Task 2.3.0-beta1 (thanks to Kosta H). --- AUTHORS | 1 + ChangeLog | 1 + src/Task.cpp | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 69d1f8f9b..8889fa147 100644 --- a/AUTHORS +++ b/AUTHORS @@ -188,3 +188,4 @@ suggestions: Dmitriy Matrosov Michele Santullo Scott Kroll + Kosta H diff --git a/ChangeLog b/ChangeLog index 2585305f9..9386e5ab6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -82,6 +82,7 @@ Bugs + #1352 Terminal crashes when using taskwarrior's zsh completion (thanks to Ivan Freitas, XTaran). + #1356 Command reference now mentions /from/to/g. + + #1381 Invalid JSON exported by Task 2.3.0-beta1 (thanks to Kosta H). + #1387 ZSH Auto-Completion dates are not current (thanks to Benjamin Weber). + #1388 Updated task(1) man pages with import/export script examples (thanks to Benjamin Weber). diff --git a/src/Task.cpp b/src/Task.cpp index 30a28c199..ec6e9679d 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -797,13 +797,13 @@ std::string Task::composeJSON (bool decorate /*= false*/) const Task::const_iterator i; for (i = this->begin (); i != this->end (); ++i) { - if (attributes_written) - out << ","; - // Annotations are not written out here. if (i->first.substr (0, 11) == "annotation_") continue; + if (attributes_written) + out << ","; + std::string type = Task::attributes[i->first]; if (type == "") type = "string";