Import
- Trying different methods of making this code cleaner. Not working so far.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user