mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-04 10:37:19 +02:00
Import
- Trying different methods of making this code cleaner. Not working so far.
This commit is contained in:
parent
3e5bb713eb
commit
fb23bf73a3
2 changed files with 19 additions and 1 deletions
|
@ -122,5 +122,11 @@ namespace json
|
||||||
std::string decode (const std::string&);
|
std::string decode (const std::string&);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef std::vector<json::value*> json_array;
|
||||||
|
typedef std::map<std::string, json::value*> json_object;
|
||||||
|
|
||||||
|
typedef std::vector <json::value*>::iterator json_array_iter;
|
||||||
|
typedef std::map <std::string, json::value*>::iterator json_object_iter;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -97,18 +97,30 @@ int CmdImport::execute (std::string& output)
|
||||||
std::cout << root->dump ()
|
std::cout << root->dump ()
|
||||||
<< "\n";
|
<< "\n";
|
||||||
|
|
||||||
/*
|
|
||||||
// For each object element...
|
// For each object element...
|
||||||
|
json_object_iter i;
|
||||||
|
for (i = ((json_object*)root)->begin ();
|
||||||
|
i != ((json_object*)root)->end ();
|
||||||
|
++i)
|
||||||
|
{
|
||||||
|
std::cout << "!!!\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
std::map <std::string, json::value*>::iterator i;
|
std::map <std::string, json::value*>::iterator i;
|
||||||
for (i = ((std::map <std::string, json::value*>*)root)->begin ();
|
for (i = ((std::map <std::string, json::value*>*)root)->begin ();
|
||||||
i != ((std::map <std::string, json::value*>*)root)->end ();
|
i != ((std::map <std::string, json::value*>*)root)->end ();
|
||||||
++i)
|
++i)
|
||||||
{
|
{
|
||||||
Task task;
|
Task task;
|
||||||
|
std::cout << "!!!\n";
|
||||||
|
|
||||||
// TODO Navigate each object.
|
// TODO Navigate each object.
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
delete root;
|
||||||
|
root = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue