7#include <nlohmann/json-schema.hpp>
14using nlohmann::json_schema::json_validator;
18 "ICGA_2004_bpo.json");
20 "ICGA_2004_raw.json");
24 "raw_points_schema.json");
28 auto points_spec_ICGA_2004 =
30 auto points_spec_schema =
33 auto raw_points_ICGA_2004 =
37 json_validator spec_validator;
40 spec_validator.set_root_schema(raw_points_schema);
41 }
catch (
const std::exception &e) {
42 std::cerr <<
"Points Spec schema validation failed: " << e.what()
49 auto spec_validation_result = spec_validator.validate(raw_points_ICGA_2004);
50 std::cout <<
"ICGA 2004 points spec validation succeeded" << std::endl;
51 }
catch (
const std::exception &e) {
52 std::cerr <<
"ICGA 2004 points spec validation failed: " << e.what()
56 json_validator raw_points_validator;
Definition of JsonUtility CRTP interface.
Declaration and implementation of templated portions of jsonio::NlohmannJsonUtility.
nlohmann::json import_json(std::string file_path)
static const std::string raw_points_schema_path
static const std::string points_spec_ICGA_2004_path
static const std::string raw_points_ICGA_2004_path
static const std::string points_spec_schema_path
Importing / exporting objects from / to json files.
const string get_data_file_abs_path(const std::string data_file)