13 const string file_path
15 ifstream input{file_path};
16 auto serialized_json = nlohmann::json::parse(input);
22 const string file_path
24 auto serialized_json = Serialize(bpo_points);
25 ExportSerializedJson(serialized_json, file_path);
29 nlohmann::json serialized_json,
30 const string file_path
32 ofstream fout{file_path};
33 fout << setw(4) << serialized_json << endl;
38 ifstream input{file_path};
39 return nlohmann::json::parse(input);
43 nlohmann::json serialized_json,
46 serialized_json.at(
"black_base").get_to(bpo_points.
black_base_);
48 serialized_json.at(
"black_position").get_to(bpo_points.
black_position_);
Definitions of classes used for storing piece points in Base Points Offset form.
void ImplementExport(T &object, const std::string file_path)
nlohmann::json Serialize(piecepoints::BPOPointsSKeys &bpo_points)
nlohmann::json ImportToSerializedJson(const std::string file_path)
void ExportSerializedJson(nlohmann::json serialized_json, const std::string file_path)
void ImplementImport(T &object, const std::string file_path)
void Deserialize(nlohmann::json serialized_json, piecepoints::BPOPointsSKeys &bpo_points)
Piece Points spec in "Base Points Offset" form with string keys in member unordered_map objects for e...
TeamPointsSMap_t black_position_
BasePointsSMap_t black_base_
TeamPointsSMap_t red_position_offsets_
BasePointsSMap_t red_base_offsets_
Declaration and implementation of templated portions of jsonio::NlohmannJsonUtility.