mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-05 14:07:21 +02:00
Export
- Added the ability to include the ID in _query command results.
This commit is contained in:
parent
0471c17f12
commit
f183201f6f
3 changed files with 7 additions and 3 deletions
|
@ -426,11 +426,15 @@ std::string Task::composeYAML () const
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
std::string Task::composeJSON () const
|
||||
std::string Task::composeJSON (bool include_id /*= false*/) const
|
||||
{
|
||||
std::stringstream out;
|
||||
out << "{";
|
||||
|
||||
// ID inclusion is optional, not recommended.
|
||||
if (include_id)
|
||||
out << "\"id\":" << id << ",";
|
||||
|
||||
// Used for determining type.
|
||||
Att att;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue