From 328b7ec2604c66ed758692fe8e1577c96b56f7f7 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 14 Feb 2015 22:16:57 +0100 Subject: [PATCH] Task: Do not export empty attributes in composeJSON --- src/Task.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Task.cpp b/src/Task.cpp index 4cb1ffa96..de02116e4 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -805,6 +805,10 @@ std::string Task::composeJSON (bool decorate /*= false*/) const if (i->first.substr (0, 11) == "annotation_") continue; + // If value is an empty string, do not ever output it + if (i->second == "") + continue; + if (attributes_written) out << ",";