licornea_tools
copy_json.cc
Go to the documentation of this file.
1 #include "../lib/args.h"
2 #include "../lib/json.h"
3 
4 using namespace tlz;
5 
6 int main(int argc, const char* argv[]) {
7  get_args(argc, argv, "in.json out.json");
8  std::string in_filename = in_filename_arg();
9  std::string out_filename = out_filename_arg();
10 
11  json j = import_json_file(in_filename);
12  export_json_file(j, out_filename);
13 }
std::string in_filename_arg()
Definition: args.cc:98
int main(int argc, const char *argv[])
Definition: copy_json.cc:6
void export_json_file(const json &j, const std::string &filename, bool compact)
Definition: json.cc:9
std::string out_filename_arg()
Definition: args.cc:104
nlohmann::json json
Definition: json.h:11
json import_json_file(const std::string &filename)
Definition: json.cc:24
void get_args(int argc, const char *argv[], const std::string &usage)
Definition: args.cc:49