|
@@ -303,7 +303,6 @@ void Galaxy::load(void) {
|
|
|
std::ifstream fin(filename);
|
|
|
data = json::parse(fin);
|
|
|
}
|
|
|
- // YAML::Node data = YAML::LoadFile(filename);
|
|
|
|
|
|
if (data.contains("meta")) {
|
|
|
meta = data["meta"];
|
|
@@ -365,10 +364,10 @@ void Galaxy::load(void) {
|
|
|
BUGZ_LOG(fatal) << "Missing warps section.";
|
|
|
}
|
|
|
|
|
|
- BUGZ_LOG(trace) << "YAML: meta keys: " << meta.size();
|
|
|
- BUGZ_LOG(trace) << "YAML: config keys: " << config.size();
|
|
|
- BUGZ_LOG(trace) << "YAML: warp keys: " << warps.size();
|
|
|
- BUGZ_LOG(trace) << "YAML: port keys: " << ports.size();
|
|
|
+ BUGZ_LOG(trace) << "JSON: meta keys: " << meta.size();
|
|
|
+ BUGZ_LOG(trace) << "JSON: config keys: " << config.size();
|
|
|
+ BUGZ_LOG(trace) << "JSON: warp keys: " << warps.size();
|
|
|
+ BUGZ_LOG(trace) << "JSON: port keys: " << ports.size();
|
|
|
|
|
|
} else {
|
|
|
BUGZ_LOG(fatal) << "Missing: " << filename;
|
|
@@ -410,9 +409,9 @@ void Galaxy::save(void) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- for (auto key : to_delete) {
|
|
|
- BUGZ_LOG(fatal) << "erasing meta key: [" << m.key() << "]";
|
|
|
- meta.erase(m.key());
|
|
|
+ for (auto const &key : to_delete) {
|
|
|
+ BUGZ_LOG(fatal) << "erasing meta key: [" << key << "]";
|
|
|
+ meta.erase(key);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -427,12 +426,12 @@ void Galaxy::save(void) {
|
|
|
output["meta"] = meta;
|
|
|
output["config"] = config;
|
|
|
|
|
|
- BUGZ_LOG(trace) << "YAML meta: " << meta.size();
|
|
|
+ BUGZ_LOG(trace) << "JSON: meta: " << meta.size();
|
|
|
// yaml_out(fout, depth, meta);
|
|
|
|
|
|
- BUGZ_LOG(trace) << "YAML config: " << config.size();
|
|
|
+ BUGZ_LOG(trace) << "JSON: config: " << config.size();
|
|
|
|
|
|
- BUGZ_LOG(trace) << "YAML warps: " << warps.size();
|
|
|
+ BUGZ_LOG(trace) << "JSON: warps: " << warps.size();
|
|
|
|
|
|
// in config, I usually switch to doing flow instead. I'll keep this like
|
|
|
// this for now.
|
|
@@ -456,7 +455,7 @@ void Galaxy::save(void) {
|
|
|
// fout << "]" << std::endl;
|
|
|
}
|
|
|
|
|
|
- BUGZ_LOG(trace) << "YAML ports: " << ports.size();
|
|
|
+ BUGZ_LOG(trace) << "JSON: ports: " << ports.size();
|
|
|
// fout << "ports:" << std::endl;
|
|
|
|
|
|
for (auto const &port : ports) {
|