Merge branch '1.9.4' of tasktools.org:task into 1.9.4
This commit is contained in:
23
src/Task.cpp
23
src/Task.cpp
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user