Merge branch '1.9.4' of tasktools.org:task into 1.9.4

This commit is contained in:
Paul Beckingham 2010-12-27 00:24:30 -05:00
commit 4a58fbdd53
9 changed files with 268 additions and 13 deletions

View file

@ -424,6 +424,29 @@ std::string Task::composeYAML () const
return out.str ();
}
////////////////////////////////////////////////////////////////////////////////
std::string Task::composeJSON () const
{
std::stringstream out;
out << "{";
std::map <std::string, Att>::const_iterator i;
for (i = this->begin (); i != this->end (); ++i)
{
if (i != this->begin ())
out << ",";
out << "\""
<< i->second.name ()
<< "\":\""
<< i->second.value ()
<< "\"";
}
out << "}";
return out.str ();
}
////////////////////////////////////////////////////////////////////////////////
void Task::getAnnotations (std::vector <Att>& annotations) const
{