trajopt
Main Page
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Pages
src
trajopt
test
trajopt_test_utils.hpp
1
#include <json/json.h>
2
#include <fstream>
3
#include <stdexcept>
4
5
Json::Value readJsonFile(
const
std::string& fname) {
6
Json::Value root;
7
Json::Reader reader;
8
std::ifstream fh(fname.c_str());
9
bool
parse_success = reader.parse(fh, root);
10
if
(!parse_success)
throw
std::runtime_error(
"failed to parse "
+fname);
11
return
root;
12
}
Generated on Tue Jul 2 2013 01:56:59 for trajopt by
1.8.3