rex/main.cpp

34 lines
810 B
C++
Raw Normal View History

2017-04-18 23:04:21 +00:00
#include <iostream>
#include <fstream>
#include "src/json/json.h"
#include <string>
#include "src/json/json-forwards.h"
#include "src/loaders.h"
void json_file_to_json_obj(std::string filename)
{
2017-04-18 23:16:10 +00:00
Conf jsonLoader = Conf(filename);
2017-04-18 23:04:21 +00:00
Json::Value root = jsonLoader.get_root();
const std::string planpath = root.get("plan_path", NULL).asString();
2017-04-18 23:16:10 +00:00
2017-04-18 23:04:21 +00:00
std::cout << planpath;
}
/*configuration load_config_file( std::string filename )
{
json j_conf = json_file_to_json_obj( filename );
configuration appconfig = j_conf;
return appconfig;
}*/
int main()
{
// configuration appconf = load_config_file( "./config.json" );
// std::cout << appconf.plan_path << std::endl;
// std::cout << appconf.units_path << std::endl;
json_file_to_json_obj( "config.json" );
return 0;
}